Create benchmarking library

This commit is contained in:
2024-11-10 13:16:10 +00:00
parent 15a6195bf0
commit e4d3b08bf2
4 changed files with 152 additions and 0 deletions

16
benchmarks/CMakeLists.txt Normal file
View 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()