Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert <krzmbrzl@gmail.com>2020-09-23 12:00:31 +0300
committerRobert <krzmbrzl@gmail.com>2020-09-23 12:00:31 +0300
commitcf92cf9c0766b03a8096b499e465a6a8cc28b6f1 (patch)
tree51b38889bc5755565473b9379019c55593706db4 /CMakeLists.txt
parent69dfdd2135f7fd6fadd662d77bc4e712a91fd275 (diff)
BUILD(cmake): Suppress warning on following runs
The way the deprecation check for BUILD_TESTING worked, it would issue a warning in any case from the second run onwards (as CTest will set this variable to the cache)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
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()