Skip to content

Commit b7c4958

Browse files
committed
CMakeLists: add DATA_TAMER_BUILD_BENCHMARKS option
1 parent 561dcf4 commit b7c4958

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

data_tamer_cpp/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
1010
if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
1111
option(DATA_TAMER_BUILD_TESTS "Build tests" ON)
1212
option(DATA_TAMER_BUILD_EXAMPLES "Build examples" ON)
13+
option(DATA_TAMER_BUILD_BENCHMARKS "Build benchmarks" ON)
1314
else()
1415
option(DATA_TAMER_BUILD_TESTS "Build tests" OFF)
1516
option(DATA_TAMER_BUILD_EXAMPLES "Build examples" OFF)
17+
option(DATA_TAMER_BUILD_BENCHMARKS "Build benchmarks" OFF)
1618
endif()
1719

1820
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
@@ -191,9 +193,11 @@ if(DATA_TAMER_BUILD_EXAMPLES)
191193
add_subdirectory(examples)
192194
endif()
193195

194-
find_package(benchmark QUIET)
195-
if(benchmark_FOUND)
196-
add_subdirectory(benchmarks)
197-
else()
198-
message("Google Benchmark library not found")
199-
endif()
196+
if(DATA_TAMER_BUILD_BENCHMARKS)
197+
find_package(benchmark QUIET)
198+
if(benchmark_FOUND)
199+
add_subdirectory(benchmarks)
200+
else()
201+
message("Google Benchmark library not found")
202+
endif()
203+
endif()

0 commit comments

Comments
 (0)