17 lines
489 B
CMake
17 lines
489 B
CMake
add_library(benchmarking benchmarking.c)
|
|
set_default_target_options(benchmarking)
|
|
target_include_directories(benchmarking PUBLIC include)
|
|
|
|
function(add_benchmark_suite source)
|
|
string(REGEX REPLACE ".c$" "" name ${source})
|
|
add_executable(${name} ${source})
|
|
set_default_target_options(${name})
|
|
target_link_libraries(${name} PRIVATE lib benchmarking)
|
|
endfunction()
|
|
|
|
function(add_benchmark_suites)
|
|
foreach(source ${ARGN})
|
|
add_benchmark_suite(${source})
|
|
endforeach()
|
|
endfunction()
|