From b7c4958cfb2b56aec6318c7cff30befa5101ebb3 Mon Sep 17 00:00:00 2001 From: Unimore Date: Fri, 10 Oct 2025 16:09:59 +0000 Subject: [PATCH] CMakeLists: add DATA_TAMER_BUILD_BENCHMARKS option --- data_tamer_cpp/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/data_tamer_cpp/CMakeLists.txt b/data_tamer_cpp/CMakeLists.txt index 0f16b10..388c9be 100644 --- a/data_tamer_cpp/CMakeLists.txt +++ b/data_tamer_cpp/CMakeLists.txt @@ -10,9 +10,11 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) option(DATA_TAMER_BUILD_TESTS "Build tests" ON) option(DATA_TAMER_BUILD_EXAMPLES "Build examples" ON) + option(DATA_TAMER_BUILD_BENCHMARKS "Build benchmarks" ON) else() option(DATA_TAMER_BUILD_TESTS "Build tests" OFF) option(DATA_TAMER_BUILD_EXAMPLES "Build examples" OFF) + option(DATA_TAMER_BUILD_BENCHMARKS "Build benchmarks" OFF) endif() option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) @@ -191,9 +193,11 @@ if(DATA_TAMER_BUILD_EXAMPLES) add_subdirectory(examples) endif() -find_package(benchmark QUIET) -if(benchmark_FOUND) - add_subdirectory(benchmarks) -else() - message("Google Benchmark library not found") -endif() +if(DATA_TAMER_BUILD_BENCHMARKS) + find_package(benchmark QUIET) + if(benchmark_FOUND) + add_subdirectory(benchmarks) + else() + message("Google Benchmark library not found") + endif() +endif() \ No newline at end of file