diff options
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e3fe096c7..cb4780571 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,7 @@ message(STATUS "Build type: ${BUILD_STR}") message(STATUS "##################################################") # We have to check for BUILD_TESTING before including CTest as CTest defines this variable -if(DEFINED BUILD_TESTING) +if(DEFINED BUILD_TESTING AND NOT BUILD_TESTING_CHECKED) message(WARNING "Use of option \"BUILD_TESTING\" is deprecated. Use \"tests\" instead.") if(NOT tests) @@ -124,6 +124,8 @@ if(DEFINED BUILD_TESTING) endif() endif() +set(BUILD_TESTING_CHECKED ON INTERNAL CACHE BOOL "Persistent helper variable" FORCE) + if(tests) include(CTest) endif() |