For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.10 where possible.
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 3.6)
+cmake_minimum_required(VERSION 3.10)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
@@ -1,4 +1,4 @@
include(RunCMake)
foreach(v TEST_ANDROID_NDK TEST_ANDROID_STANDALONE_TOOLCHAIN)
-cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE) # or languages needed
project(UicIncrementalBuild LANGUAGES CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
@@ -130,7 +130,7 @@ function(run_ReGeneration)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}")
set(ProjectHeader [=[
- cmake_minimum_required(VERSION 3.5)
+ cmake_minimum_required(VERSION 3.10)
project(Regenerate-Project NONE)
]=])
-cmake_minimum_required(VERSION 3.8)
+cmake_minimum_required(VERSION 3.8) # old enough to not set CMP0068
project(${RunCMake_TEST} CXX)
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "")
include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
project(${RunCMake_TEST})
if(NOT NoProject)
endif()
project(CTestCommandLine@CASE_NAME@ NONE)
include(CTest)
add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
set(CTEST_SITE "test-site")
set(CTEST_BUILD_NAME "test-build-name")
project(TimeoutAfterMatch NONE)
add_test(NAME SleepFor1Second COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_SOURCE_DIR}/SleepFor1Second.cmake)
-cmake_minimum_required(VERSION 3.9)
include(CheckIPOSupported)
@@ -1,2 +1,2 @@
-^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \)
+^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.10 \)
.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand NONE \)
.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand-warn-uninitialized NONE \)
.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(\${RunCMake_TEST} NONE \)
if(NOT RunCMake_TEST)
set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted
-cmake_minimum_required(VERSION 3.3)
-cmake_minimum_required(VERSION 3.7)
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 2.8.12) # old enough to not set CMP0029 through CMP0036
if(RunCMake_TEST MATCHES "^BeforeProject")
if(CMP0168 STREQUAL "NEW")
@@ -1,4 +1,7 @@
+if(RunCMake_TEST MATCHES "CMP0070-(WARN|OLD)")
+ cmake_policy(VERSION 3.9) # old enough to not set CMP0070
+endif()
if(NOT TEST_FILE)
set(TEST_FILE ${RunCMake_TEST}.cmake)
cmake_policy(SET CMP0167 OLD) # This test covers FindBoost
project(${RunCMake_TEST} C)
project(nodeprecated_test)
@@ -1,3 +1,6 @@
+if(RunCMake_TEST STREQUAL "CMP0044-WARN")
+ cmake_policy(VERSION 2.8.11) # old enough to not set CMP0044
@@ -1,7 +1,7 @@
if(RunCMake_TEST MATCHES "-CMP0052")
- cmake_minimum_required(VERSION 3.0)
+ cmake_minimum_required(VERSION 3.0) # old enough to not set CMP0052
else()
@@ -1,6 +1,6 @@
if(RunCMake_TEST MATCHES "^CMP0028")
- cmake_minimum_required(VERSION 2.8.12)
+ cmake_minimum_required(VERSION 2.8.12) # old enough to not set CMP0028
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
@@ -11,7 +11,7 @@
# -DUNAME="Darwin" -- operating system name (def: CMAKE_SYSTEM_NAME)
#
if(POLICY CMP0089)
cmake_policy(SET CMP0089 NEW)
# MSVC creates extra targets which pollute the stderr unless we set this.
project(CPackWiXGenerator)
message(STATUS "source: '${CMAKE_SOURCE_DIR}'")
project(${RunCMake_TEST} LANGUAGES NONE)
-cmake_minimum_required(VERSION 3.5.0)
@@ -1,4 +1,11 @@
-^CMake Deprecation Warning at CMP0063-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_policy\):
+ Compatibility with CMake < 3\.5 will be removed from a future version of
+ CMake\.
+
+ Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell
+ CMake that the project does not need compatibility with older versions\.
++
+CMake Deprecation Warning at CMP0063-OLD.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0063 will be removed from a future version
of CMake.
@@ -1,3 +1,10 @@
CMake Warning \(dev\) at CMP0063-WARN-exe.cmake:[0-9]+ \(add_executable\):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
@@ -0,0 +1,6 @@
+ CMake that the project does not need compatibility with older versions\.$
CMake Warning \(dev\) at CMP0063-WARN-obj.cmake:[0-9]+ \(add_library\):
CMake Warning \(dev\) at CMP0063-WARN-sta.cmake:[0-9]+ \(add_library\):