diff options
author | Bartosz Taczała <bartosz.taczala@mobica.com> | 2017-01-11 11:28:28 +0300 |
---|---|---|
committer | Bartosz Taczała <bartosz.taczala@mobica.com> | 2017-01-11 11:32:55 +0300 |
commit | 50c181ea4baac473ad3c48c3d3aebb05b3f06d96 (patch) | |
tree | 4c48b4c3a3e59336f356b41354bc079f425917e6 /CMakeLists.txt | |
parent | 2ec188041f9cdff9cb098bb9893f2685d609d6c4 (diff) |
Add prefix for BUILD_TESTING cmake option
This is helpful when using spdlog as a dependency (git submodule) when a
master project is not interested in spdlog tests. Using
"BUILD_TESTING" name may create a confusion.
Extra: BUILD_EXAMPLE variable already have a prefix.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3976befc..61c45b5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ endif() add_library(spdlog INTERFACE)
option(SPDLOG_BUILD_EXAMPLES "Build examples" OFF)
+option(SPDLOG_BUILD_TESTING "Build spdlog tests" ON)
target_include_directories(
spdlog
@@ -27,12 +28,11 @@ target_include_directories( set(HEADER_BASE "${CMAKE_CURRENT_SOURCE_DIR}/include")
-include(CTest)
if(SPDLOG_BUILD_EXAMPLES)
add_subdirectory(example)
endif()
-if(BUILD_TESTING)
+if(SPDLOG_BUILD_TESTING)
add_subdirectory(tests)
endif()
|