Use CMake's BUILD_TESTING instead of proprietary custom variable

This commit is contained in:
TheAssassin 2018-10-24 13:03:50 +02:00
parent 7e4a320f61
commit a1308955e7
2 changed files with 6 additions and 4 deletions

View File

@ -14,8 +14,7 @@ add_subdirectory(lib)
add_subdirectory(src)
option(BUILD_TEST "Build the tests" ON)
if(BUILD_TEST)
enable_testing()
include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()

View File

@ -109,4 +109,7 @@ if(NOT USE_SYSTEM_BOOST)
)
endif()
add_subdirectory(googletest)
include(CTest)
if(BUILD_TESTING)
add_subdirectory(googletest)
endif()