diff --git a/CMakeLists.txt b/CMakeLists.txt index fa1d45a7..215872ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.1) project(spdlog VERSION 1.0.0) +include(CTest) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -12,7 +13,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) add_library(spdlog INTERFACE) option(SPDLOG_BUILD_EXAMPLES "Build examples" OFF) -option(SPDLOG_BUILD_TESTS "Build tests" OFF) target_include_directories( spdlog @@ -28,7 +28,7 @@ if(SPDLOG_BUILD_EXAMPLES) add_subdirectory(example) endif() -if(SPDLOG_BUILD_TESTS) +if(BUILD_TESTING) add_subdirectory(tests) endif()