Skip to content

Commit b83ffac

Browse files
committed
test benchmark only with singlethreaded workloads
1 parent eae8d63 commit b83ffac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

benchmark/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ function(add_umf_benchmark)
4040
# * SRCS - source files
4141
# * LIBS - libraries to be linked with
4242
# * LIBDIRS - directories of libraries to be linked with
43+
# * EXTRARGS - additional arguments to be passed to the add_test
4344
set(oneValueArgs NAME)
44-
set(multiValueArgs SRCS LIBS LIBDIRS)
45+
set(multiValueArgs SRCS LIBS LIBDIRS EXTRARGS)
4546
cmake_parse_arguments(
4647
ARG
4748
""
@@ -66,7 +67,7 @@ function(add_umf_benchmark)
6667

6768
add_test(
6869
NAME ${BENCH_NAME}
69-
COMMAND ${BENCH_NAME}
70+
COMMAND ${BENCH_NAME} ${ARG_EXTRARGS}
7071
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
7172

7273
if("${BENCH_NAME}" STREQUAL "umf-ubench")
@@ -148,7 +149,7 @@ add_umf_benchmark(
148149
NAME benchmark
149150
SRCS benchmark.cpp
150151
LIBS ${LIBS_OPTIONAL} benchmark::benchmark
151-
LIBDIRS ${LIB_DIRS})
152+
LIBDIRS ${LIB_DIRS} EXTRARGS --benchmark_filter=threads:1$)
152153

153154
if(UMF_BUILD_BENCHMARKS_MT)
154155
add_umf_benchmark(

0 commit comments

Comments
 (0)