diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/rocksdb/microbench/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rocksdb/microbench/CMakeLists.txt')
-rw-r--r-- | src/rocksdb/microbench/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rocksdb/microbench/CMakeLists.txt b/src/rocksdb/microbench/CMakeLists.txt new file mode 100644 index 000000000..483e97973 --- /dev/null +++ b/src/rocksdb/microbench/CMakeLists.txt @@ -0,0 +1,17 @@ +find_package(benchmark REQUIRED) +find_package(Threads REQUIRED) + +file(GLOB_RECURSE ALL_BENCH_CPP *.cc) +foreach(ONE_BENCH_CPP ${ALL_BENCH_CPP}) + get_filename_component(TARGET_NAME ${ONE_BENCH_CPP} NAME_WE) + add_executable(${TARGET_NAME} ${ONE_BENCH_CPP}) + target_link_libraries(${TARGET_NAME} ${ROCKSDB_LIB} benchmark::benchmark + ${CMAKE_THREAD_LIBS_INIT}) + # run benchmark like a test, if added, the benchmark tests could be run by `ctest -R Bench_` + # add_test(Bench_${TARGET_NAME} ${TARGET_NAME}) + list(APPEND ALL_BENCH_TARGETS ${TARGET_NAME}) +endforeach() +add_custom_target(microbench DEPENDS ${ALL_BENCH_TARGETS}) +add_custom_target(run_microbench + COMMAND for t in ${ALL_BENCH_TARGETS}\; do \.\/$$t \|\| exit 1\; done + DEPENDS ${ALL_BENCH_TARGETS}) |