summaryrefslogtreecommitdiff
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-02-09 09:35:22 -0500
committerBrad King <brad.king@kitware.com>2023-02-11 06:25:11 -0500
commit3a4791548dfeb69e645e8fea8e669473d4f868cf (patch)
treecacff3748cdff410a5e0e6219db92f4b83535806 /Tests/RunCMake
parent1edf1385064d67885bafe09d472f82bf62d34641 (diff)
downloadcmake-3a4791548dfeb69e645e8fea8e669473d4f868cf.tar.gz
Deprecate compatibility with CMake versions older than 3.5
Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.5. Note that the effective policy version includes `...<max>` treatment. Update the check from commit 5845c218d7 (Deprecate compatibility with CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CMP0026/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0037/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0038/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0039/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0040/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0041/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0042/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0043/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0045/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0046/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0049/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0050/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0051/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0053/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0054/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0055/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0057/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0060/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0064/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0065/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt7
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt11
-rw-r--r--Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt13
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt13
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt8
-rw-r--r--Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt11
-rw-r--r--Tests/RunCMake/PolicyScope/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/RunCMake.cmake2
-rw-r--r--Tests/RunCMake/Syntax/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Syntax/String1-stderr.txt4
-rw-r--r--Tests/RunCMake/Syntax/String1.cmake4
-rw-r--r--Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt26
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt26
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before3_5.cmake (renamed from Tests/RunCMake/cmake_minimum_required/Before2812.cmake)0
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt10
-rw-r--r--Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt9
-rw-r--r--Tests/RunCMake/install/CMP0062-OLD-stderr.txt15
-rw-r--r--Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/project/CMP0048-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/project/CMP0048-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt13
-rw-r--r--Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake1
50 files changed, 198 insertions, 66 deletions
diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
index 047da283b9..6476176d51 100644
--- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0026-WARN)
run_cmake(CMP0026-OLD)
diff --git a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake
index 5952279eb4..558fba3bf2 100644
--- a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
if(RunCMake_GENERATOR MATCHES "^Ninja")
# Detect ninja version so we know what tests can be supported.
diff --git a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake
index fc3500addd..3e7b5f3b56 100644
--- a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0038-WARN)
run_cmake(CMP0038-NEW)
diff --git a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake
index 58e8ea91eb..ce7541aaf4 100644
--- a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0039-WARN)
run_cmake(CMP0039-NEW)
diff --git a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake
index 13160e3a40..e5e6c3759d 100644
--- a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0040-OLD-missing-target)
run_cmake(CMP0040-NEW-missing-target)
diff --git a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
index f47bb2ee31..93378c20aa 100644
--- a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
# Protect tests from running inside the default install prefix.
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefaultPrefix")
diff --git a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake
index 3b226d74cb..6b2314542e 100644
--- a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0042-OLD)
run_cmake(CMP0042-NEW)
diff --git a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake
index 7f9572e5af..b940528a5a 100644
--- a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
diff --git a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake
index 7c0e8a2151..009d455cae 100644
--- a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0045-OLD)
run_cmake(CMP0045-NEW)
diff --git a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake
index 0a39c76596..86b749aacc 100644
--- a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0046-OLD-missing-dependency)
run_cmake(CMP0046-NEW-missing-dependency)
diff --git a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake
index a8aa9d9650..e71f31e87b 100644
--- a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0049-OLD)
run_cmake(CMP0049-NEW)
diff --git a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake
index b7de28491d..526a9aacbf 100644
--- a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0050-OLD)
run_cmake(CMP0050-NEW)
diff --git a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake
index 621192d9f6..955d8987ce 100644
--- a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0051-OLD)
run_cmake(CMP0051-NEW)
diff --git a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake
index 6521ac074d..de58c25723 100644
--- a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0053-OLD)
run_cmake(CMP0053-NEW)
diff --git a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
index 2f2fb765da..fc031de9fb 100644
--- a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0054-OLD)
run_cmake(CMP0054-NEW)
diff --git a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake
index efcfcab674..33a5b4b3b7 100644
--- a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0055-OLD-Out-of-Scope)
run_cmake(CMP0055-NEW-Out-of-Scope)
diff --git a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
index 719e054a57..76eaca6e7f 100644
--- a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0057-OLD)
run_cmake(CMP0057-WARN)
diff --git a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake
index 445156fa1a..b7eae5a46b 100644
--- a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
function(run_cmake_CMP0060 CASE)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0060-${CASE}-build)
diff --git a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake
index 26e0a91a74..4c68510eee 100644
--- a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(CMP0064-OLD)
run_cmake(CMP0064-WARN)
diff --git a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake
index e86b50eb16..1ca4605a7e 100644
--- a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(OLDBad1)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "AIX")
diff --git a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
index 208ea20855..f3974eacf4 100644
--- a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
+++ b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
foreach(p
CMP0029
diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt
index a4c8dcd1fb..fab2ce2d18 100644
--- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt
@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\):
+ 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 Warning \(dev\) in CMakeLists\.txt:
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 2d545d9224..b139210d72 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(BadIF)
run_cmake(BadCONFIG)
diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt
index 001bd4e462..d0aef2c476 100644
--- a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_minimum_required\):
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ 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 CMakeLists.txt:[0-9]+ \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
index 001bd4e462..4db8209bae 100644
--- a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_minimum_required\):
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ 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 CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt
index b7a07559ff..55aa1bbe79 100644
--- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt
+++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMP0028-OLD-iface.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\):
+ 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 CMP0028-OLD-iface\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0028 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt
index 586a876a0a..f11d8f5767 100644
--- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt
+++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMP0028-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\):
+ 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 CMP0028-OLD\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0028 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt
index 9a606ee60a..6d340b0f11 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt
@@ -1,6 +1,15 @@
-^CMake Deprecation Warning at CMP0058-OLD-by.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9] \(include\)
++
+CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0058 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt
index ba6e5da4e0..834c781354 100644
--- a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt
+++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt
@@ -1,6 +1,15 @@
-^CMake Deprecation Warning at CMP0058-OLD-no.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9] \(include\)
++
+CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0058 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt
new file mode 100644
index 0000000000..2927f527b3
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at CMP0058-WARN-by\.cmake:[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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9] \(include\)$
diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
index 439a2d9bfd..1ffb4169d0 100644
--- a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
+++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt
@@ -1,4 +1,13 @@
-^CMake Warning \(dev\):
+^CMake Deprecation Warning at CMP0058-WARN-no\.cmake:[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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9] \(include\)
++
+CMake Warning \(dev\):
Policy CMP0058 is not set: Ninja requires custom command byproducts to be
explicit. Run "cmake --help-policy CMP0058" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
diff --git a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
index abd27f4cd8..da608b3729 100644
--- a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(NotClosed)
run_cmake(NotOpened)
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index cfc84ca877..e1c923d621 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -190,7 +190,7 @@ function(run_cmake test)
string(REGEX REPLACE [[
^CMake Deprecation Warning at [^
]*CMakeLists.txt:1 \(cmake_minimum_required\):
- Compatibility with CMake < 2\.8\.12 will be removed from a future version of
+ 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
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index f0c287cdb9..f56ac64753 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(BOM-UTF-8)
run_cmake(BOM-UTF-16-LE)
diff --git a/Tests/RunCMake/Syntax/String1-stderr.txt b/Tests/RunCMake/Syntax/String1-stderr.txt
index 07e98dae04..382ea005bb 100644
--- a/Tests/RunCMake/Syntax/String1-stderr.txt
+++ b/Tests/RunCMake/Syntax/String1-stderr.txt
@@ -1,3 +1,3 @@
-^
+^'
1 \${var} 4
- $
+ '$
diff --git a/Tests/RunCMake/Syntax/String1.cmake b/Tests/RunCMake/Syntax/String1.cmake
index a94c9ffdb4..20ed3c119b 100644
--- a/Tests/RunCMake/Syntax/String1.cmake
+++ b/Tests/RunCMake/Syntax/String1.cmake
@@ -1,3 +1,3 @@
-message("
+message("'
1 \${var} 4
- ")
+ '")
diff --git a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake
index 7a000ee9ac..133dbe1641 100644
--- a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
run_cmake(PropertyTypo)
run_cmake(CMP0063-OLD)
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
deleted file mode 100644
index 7d40dcb047..0000000000
--- a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-^CMake Deprecation Warning at Before2812.cmake:1 \(cmake_minimum_required\):
- Compatibility with CMake < 2.8.12 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.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\):
- Compatibility with CMake < 2.8.12 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.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\):
- Compatibility with CMake < 2.8.12 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.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt
new file mode 100644
index 0000000000..79812352fa
--- /dev/null
+++ b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt
@@ -0,0 +1,26 @@
+^CMake Deprecation Warning at Before3_5\.cmake:1 \(cmake_minimum_required\):
+ 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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before3_5\.cmake:2 \(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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before3_5\.cmake:6 \(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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake
index 220e359d4d..220e359d4d 100644
--- a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake
+++ b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake
diff --git a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
index 667561ea79..8eb57486ad 100644
--- a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
+++ b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
index 81d26d260d..3eb980a58b 100644
--- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
+++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
@@ -1,9 +1,9 @@
-^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\):
- Compatibility with CMake < 2.8.12 will be removed from a future version of
- CMake.
+^CMake Deprecation Warning at CompatBefore24\.cmake:1 \(cmake_minimum_required\):
+ 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.
+ Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell
+ CMake that the project does not need compatibility with older versions\.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
diff --git a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
index 3a959bb2f9..36c44cbc71 100644
--- a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
@@ -4,7 +4,7 @@ run_cmake(Before24)
run_cmake(CompatBefore24)
run_cmake(Future)
run_cmake(PolicyBefore24)
-run_cmake(Before2812)
+run_cmake(Before3_5)
run_cmake(Range)
run_cmake(RangeBad)
run_cmake(Unknown)
diff --git a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt
index af70ac325b..f5d57e9b2a 100644
--- a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt
+++ b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt
@@ -1,2 +1,9 @@
-^(Error\(s\) when building project
+^CMake Deprecation Warning at [^
+]*/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD/test\.cmake:[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\.
++(Error\(s\) when building project
)?ctest_build returned zero$
diff --git a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt
index de0b70ffc3..6b4c4b0eb8 100644
--- a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt
+++ b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt
@@ -1,10 +1,19 @@
-^CMake Deprecation Warning at CMP0062-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMP0062-OLD\.cmake:[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\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
++
+CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0062 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)$
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
index 9103bd2d41..5dd76f778a 100644
--- a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
+++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
@@ -1,13 +1,13 @@
-^CMake Deprecation Warning at GET-CMP0007-WARN.cmake:1 \(cmake_policy\):
- Compatibility with CMake < 2.8.12 will be removed from a future version of
- CMake.
+^CMake Deprecation Warning at GET-CMP0007-WARN\.cmake:1 \(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.
+ Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell
+ CMake that the project does not need compatibility with older versions\.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
-CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
+CMake Warning \(dev\) at GET-CMP0007-WARN\.cmake:4 \(list\):
Policy CMP0007 is not set: list command no longer ignores empty elements.
Run "cmake --help-policy CMP0007" for policy details. Use the cmake_policy
command to set the policy and suppress this warning. List has value =
diff --git a/Tests/RunCMake/project/CMP0048-NEW-stderr.txt b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt
new file mode 100644
index 0000000000..ad75f4386c
--- /dev/null
+++ b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ 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\.$
diff --git a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt
index 695fb70e9b..376249b3fe 100644
--- a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt
+++ b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt
@@ -1,6 +1,13 @@
-^CMake Deprecation Warning at CMP0048-OLD.cmake:1 \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+ 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 CMP0048-OLD\.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0048 will be removed from a future version
- of CMake.
+ of CMake\.
The cmake-policies\(7\) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
diff --git a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt
index fc1a02b439..c72534fe1a 100644
--- a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt
+++ b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt
@@ -1,4 +1,4 @@
-^CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Warning \(dev\) in CMakeLists\.txt:
No project\(\) command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project\(\) command. Add a line of
code such as
@@ -8,5 +8,12 @@
near the top of the file, but after cmake_minimum_required\(\).
CMake is pretending there is a "project\(Project\)" command on the first
- line.
-This warning is for project developers. Use -Wno-dev to suppress it.$
+ line\.
+This warning is for project developers. Use -Wno-dev to suppress it\.
++
+CMake Deprecation Warning at CMakeLists\.txt:1 \(cmake_minimum_required\):
+ 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\.$
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
index 189592d764..7c5d77d74f 100644
--- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)