summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-04 13:24:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-02-04 13:24:26 (GMT)
commitf84dcbd496ad6abb1491b621142e2c222f23c11c (patch)
tree7bcb39db53d4313301815deb298366a54cbb3192 /Tests
parent57692659c677a9301af9b15657ccd56c65001c14 (diff)
parent9a48012f93376cefe94f1e61260ebbb1e1c2fed6 (diff)
downloadCMake-f84dcbd496ad6abb1491b621142e2c222f23c11c.zip
CMake-f84dcbd496ad6abb1491b621142e2c222f23c11c.tar.gz
CMake-f84dcbd496ad6abb1491b621142e2c222f23c11c.tar.bz2
Merge topic 'post-rel-dev'
9a48012f93 Configure CMake itself with policies through CMake 3.22 a5a9687799 export: Increase maximum policy version in exported files to 3.22 a9ffded98c Add deprecation warnings for policies CMP0097 and below Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6948
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath-stderr.txt18
-rw-r--r--Tests/RunCMake/project/CMP0096-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/project/VersionMax-stderr.txt10
4 files changed, 37 insertions, 3 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 59e3bcc..8a85045 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -444,7 +444,9 @@ if(do_git_tests)
set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
set(proj TS1-GIT-all-GIT_SUBMODULES-via-CMP0097-OLD)
+ set(CMAKE_WARN_DEPRECATED FALSE) # we are testing CMP0097 OLD behavior
cmake_policy(SET CMP0097 OLD)
+ unset(CMAKE_WARN_DEPRECATED)
ExternalProject_Add(${proj}
GIT_REPOSITORY "${local_git_repo}"
GIT_SUBMODULES ""
diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath-stderr.txt b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath-stderr.txt
index 2561263..8b0970a 100644
--- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath-stderr.txt
+++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath-stderr.txt
@@ -1,3 +1,15 @@
+^CMake Deprecation Warning at TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0095 will be removed from a future version
+ 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\):
+ TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake:[0-9]+ \(A_CMP0095\)
+ CMakeLists.txt:[0-9]+ \(include\)(
++
CMake Warning \(dev\) at TARGETS-FILE_RPATH_CHANGE-new_rpath\.cmake:[0-9]+ \(install\):
Policy CMP0095 is not set: RPATH entries are properly escaped in the
intermediary CMake install script\. Run "cmake --help-policy CMP0095" for
@@ -8,8 +20,8 @@ CMake Warning \(dev\) at TARGETS-FILE_RPATH_CHANGE-new_rpath\.cmake:[0-9]+ \(ins
intermediary cmake_install\.cmake script\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
-This warning is for project developers\. Use -Wno-dev to suppress it\.
-
+This warning is for project developers\. Use -Wno-dev to suppress it\.)+(
++
CMake Warning \(dev\) at TARGETS-FILE_RPATH_CHANGE-new_rpath\.cmake:[0-9]+ \(install\):
Policy CMP0095 is not set: RPATH entries are properly escaped in the
intermediary CMake install script\. Run "cmake --help-policy CMP0095" for
@@ -20,4 +32,4 @@ CMake Warning \(dev\) at TARGETS-FILE_RPATH_CHANGE-new_rpath\.cmake:[0-9]+ \(ins
intermediary cmake_install\.cmake script\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
-This warning is for project developers\. Use -Wno-dev to suppress it\.
+This warning is for project developers\. Use -Wno-dev to suppress it\.)+$
diff --git a/Tests/RunCMake/project/CMP0096-OLD-stderr.txt b/Tests/RunCMake/project/CMP0096-OLD-stderr.txt
new file mode 100644
index 0000000..beb7a84
--- /dev/null
+++ b/Tests/RunCMake/project/CMP0096-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0096-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0096 will be removed from a future version
+ 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\)$
diff --git a/Tests/RunCMake/project/VersionMax-stderr.txt b/Tests/RunCMake/project/VersionMax-stderr.txt
new file mode 100644
index 0000000..b789640
--- /dev/null
+++ b/Tests/RunCMake/project/VersionMax-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at VersionMax.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0096 will be removed from a future version
+ 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\)$