Create benchmarking library
This commit is contained in:
16
benchmarks/CMakeLists.txt
Normal file
16
benchmarks/CMakeLists.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
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 m)
|
||||
endfunction()
|
||||
|
||||
function(add_benchmark_suites)
|
||||
foreach(source ${ARGN})
|
||||
add_benchmark_suite(${source})
|
||||
endforeach()
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user