Add deprecation warnings for policies CMP0054 and below

The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for some policies
to encourage projects to port away from setting policies to OLD.
This commit is contained in:
Brad King 2017-11-01 10:43:25 -04:00
parent 9d742defd9
commit a0ec14d363
47 changed files with 409 additions and 24 deletions

View File

@ -0,0 +1,8 @@
deprecate-policy-old
--------------------
* An explicit deprecation diagnostic was added for policies ``CMP0037``
through ``CMP0054`` (``CMP0036`` and below were already deprecated).
The :manual:`cmake-policies(7)` manual explains that the OLD behaviors
of all policies are deprecated and that projects should port to the
NEW behaviors.

View File

@ -4018,7 +4018,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
// Deprecate old policies, especially those that require a lot
// of code to maintain the old behavior.
if (status == cmPolicies::OLD && id <= cmPolicies::CMP0036) {
if (status == cmPolicies::OLD && id <= cmPolicies::CMP0054) {
this->IssueMessage(cmake::DEPRECATION_WARNING,
cmPolicies::GetPolicyDeprecatedWarning(id));
}

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0037-OLD-reserved.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0037 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0037-OLD-space.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0037 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at OLD-cond-package.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0037 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at OLD-cond-package_source.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0037 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at OLD-cond.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0037 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at OLD-cond-test.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0037 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0038-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0038 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0039-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0039 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0040-OLD-existing-target.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0040 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0040-OLD-missing-target.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0040 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0041-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0041 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0041-tid-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0041 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0042-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0042 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0043-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0043 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0045-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0045 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0046-OLD-existing-dependency.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0046 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:3 \(include\)$

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0046-OLD-missing-dependency.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0046 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0049-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0049 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -0,0 +1,10 @@
^CMake Deprecation Warning at CMP0050-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0050 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:3 \(include\)$

View File

@ -1 +0,0 @@
0

View File

@ -1 +1,12 @@
^Sources: "empty.cpp"$
^CMake Deprecation Warning at CMP0051-OLD.cmake:2 \(cmake_policy\):
The OLD behavior for policy CMP0051 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:3 \(include\)
+
Sources: "empty.cpp"$

View File

@ -1,2 +1,13 @@
^called
^CMake Deprecation Warning at CMP0053-OLD.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0053 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:3 \(include\)
+
called
--><--$

View File

@ -1 +1,10 @@
$^
^CMake Deprecation Warning at CMP0054-OLD.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)$

View File

@ -1 +1,10 @@
$^
^CMake Deprecation Warning at CMP0054-keywords-OLD.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)$

View File

@ -1 +1,10 @@
$^
^CMake Deprecation Warning at CMP0054-policy-command-scope.cmake:25 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)$

View File

@ -1 +1,54 @@
$^
^CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:14 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:14 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:27 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:48 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:48 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)$

View File

@ -1 +1,10 @@
$^
^CMake Deprecation Warning at CMP0054-policy-nested-if.cmake:23 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)$

View File

@ -1 +1,54 @@
$^
^CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:16 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:16 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:37 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:58 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)
+
CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:58 \(cmake_policy\):
The OLD behavior for policy CMP0054 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:3 \(include\)$

View File

@ -0,0 +1,8 @@
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 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.$

View File

@ -0,0 +1,8 @@
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 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.$

View File

@ -1 +1,12 @@
^-->wrong<--$
^CMake Deprecation Warning at CMP0053-At-OLD.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0053 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:3 \(include\)
+
-->wrong<--$

View File

@ -0,0 +1,10 @@
^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.
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:3 \(include\)$