From 39f4c776be16eb317b552943f24e4bb7c1c62a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Tacza=C5=82a?= Date: Wed, 11 Jan 2017 09:28:28 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3976befc..edede458 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,12 +27,12 @@ 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) + include(CTest) add_subdirectory(tests) endif()