diff options
author | Brad King <brad.king@kitware.com> | 2021-02-10 14:01:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-10 14:25:32 (GMT) |
commit | 58ea0d12558b5607e81b1dfab1528bdf45393b3d (patch) | |
tree | f96e055f5e4d117e347627d4621742860c91fb52 /Tests | |
parent | 693f4c70ffc8422bf053cae3e685d0f2620ddf7a (diff) | |
download | CMake-58ea0d12558b5607e81b1dfab1528bdf45393b3d.zip CMake-58ea0d12558b5607e81b1dfab1528bdf45393b3d.tar.gz CMake-58ea0d12558b5607e81b1dfab1528bdf45393b3d.tar.bz2 |
Add deprecation warnings for policies CMP0081 and below
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for policies
introduced in CMake 3.13 and below to encourage projects to port
away from setting policies to OLD.
Diffstat (limited to 'Tests')
8 files changed, 85 insertions, 2 deletions
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt new file mode 100644 index 0000000..31a0207 --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt @@ -0,0 +1,9 @@ +^CMake Deprecation Warning at [^ +]*/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0080 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.$ diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt new file mode 100644 index 0000000..2ff5d60 --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0080-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0080 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/CMP0081/CMP0081-OLD-result.txt b/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt b/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt new file mode 100644 index 0000000..ff339fa --- /dev/null +++ b/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0081-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0081 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/UseSWIG/CMP0078-OLD-stderr.txt b/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt new file mode 100644 index 0000000..e8eaded --- /dev/null +++ b/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt @@ -0,0 +1,24 @@ +^CMake Deprecation Warning at CMP0078-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0078 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\) ++ +CMake Deprecation Warning at [^ +]*/Modules/UseSWIG.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0078 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\): + CMP0078-common.cmake:[0-9]+ \(include\) + CMP0078-OLD.cmake:[0-9]+ \(include\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/option/CMP0077-OLD-stderr.txt b/Tests/RunCMake/option/CMP0077-OLD-stderr.txt new file mode 100644 index 0000000..9d963cb --- /dev/null +++ b/Tests/RunCMake/option/CMP0077-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0077-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0077 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/target_link_libraries/CMP0079-iface-OLD-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt new file mode 100644 index 0000000..c664505 --- /dev/null +++ b/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0079-iface-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0079 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/target_link_libraries/CMP0079-link-OLD-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt index 0b4c4c6..14f4789 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt @@ -1,4 +1,15 @@ -^CMake Error at CMP0079-link/CMakeLists.txt:[0-9]+ \(target_link_libraries\): +^CMake Deprecation Warning at CMP0079-link-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0079 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\) ++ +CMake Error at CMP0079-link/CMakeLists.txt:[0-9]+ \(target_link_libraries\): Attempt to add link library "foo" to target "top" which is not built in this directory. |