Skip to content

Commit d068042

Browse files
committed
Add option to disable building benchmarks
1 parent 35ca270 commit d068042

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ include(GNUInstallDirs)
1010
include(CTest)
1111

1212
option(IS_UTF8_SANITIZE "Sanitize addresses" OFF)
13+
option(IS_UTF8_BENCHMARKS "Build benchmarks" ${PROJECT_IS_TOP_LEVEL})
1314

1415
if (NOT CMAKE_BUILD_TYPE)
1516
message(STATUS "No build type selected, default to Release")
@@ -42,8 +43,9 @@ else()
4243
message(STATUS "The tests are disabled.")
4344
endif(BUILD_TESTING)
4445

45-
46-
add_subdirectory(benchmarks)
46+
if (IS_UTF8_BENCHMARKS)
47+
add_subdirectory(benchmarks)
48+
endif()
4749

4850
message(STATUS "Compiling using the C++ standard:" ${CMAKE_CXX_STANDARD})
4951
# ---- Install rules ----

0 commit comments

Comments
 (0)