Clarify advice given by compatibility deprecation message for CMake < 3.10

Since commit 84db8506ff (Deprecate compatibility with CMake versions older
than 3.10, 2024-10-03, v3.31.0-rc1~23^2) the `cmake_minimum_required` and
`cmake_policy` commands warn if the project does not enable policies as
of 3.10 or higher.  Clarify the advice given in the warning message about
how to update the version specification, particularly without actually
requiring a newer minimum version of CMake.
This commit is contained in:
Brad King
2024-11-14 09:26:09 -05:00
parent 6a25904983
commit 4c4f173876
29 changed files with 93 additions and 63 deletions

View File

@@ -272,9 +272,9 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
MessageType::DEPRECATION_WARNING,
"Compatibility with CMake < 3.10 will be removed from "
"a future version of CMake.\n"
"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 the <min>...<max> "
"syntax to tell CMake that the project requires at least <min> but has "
"been updated to work with policies introduced by <max> or earlier.");
}
// now loop over all the policies and set them as appropriate

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Deprecation Warning at CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0070 will be removed from a future version

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
(CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0070 is not set: Define file\(GENERATE\) behavior for relative

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Deprecation Warning at SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0070 will be removed from a future version

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Warning \(dev\) in CMakeLists\.txt:
Policy CMP0026 is not set: Disallow use of the LOCATION target property.

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 will be removed from a future version

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
The OLD behavior for policy CMP0052 will be removed from a future version

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
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

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Deprecation Warning at CMP0028-OLD\.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0028 will be removed from a future version

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9] \(include\)
+

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9] \(include\)
+

View File

@@ -2,7 +2,8 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9] \(include\)$

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9] \(include\)
+

View File

@@ -227,8 +227,9 @@ function(run_cmake test)
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
]] "" actual_stderr "${actual_stderr}")
endif()

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Deprecation Warning at CMP0063-OLD.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0063 will be removed from a future version

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Warning \(dev\) at CMP0063-WARN-exe.cmake:[0-9]+ \(add_executable\):
Policy CMP0063 is not set: Honor visibility properties for all target

View File

@@ -2,5 +2,6 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.$

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Warning \(dev\) at CMP0063-WARN-obj.cmake:[0-9]+ \(add_library\):
Policy CMP0063 is not set: Honor visibility properties for all target

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Warning \(dev\) at CMP0063-WARN-sta.cmake:[0-9]+ \(add_library\):
Policy CMP0063 is not set: Honor visibility properties for all target

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
@@ -11,8 +12,9 @@ CMake Deprecation Warning at Before3_10\.cmake:2 \(cmake_policy\):
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
@@ -20,7 +22,8 @@ CMake Deprecation Warning at Before3_10\.cmake:6 \(cmake_policy\):
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+

View File

@@ -3,7 +3,8 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+(Error\(s\) when building project
)?ctest_build returned zero$

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
+

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
+

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+

View File

@@ -2,5 +2,6 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.$

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
CMake Deprecation Warning at CMP0048-OLD\.cmake:1 \(cmake_policy\):
The OLD behavior for policy CMP0048 will be removed from a future version

View File

@@ -15,5 +15,6 @@ CMake Deprecation Warning at CMakeLists\.txt:1 \(cmake_minimum_required\):
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.$

View File

@@ -2,8 +2,9 @@
Compatibility with CMake < 3\.10 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 the <min>\.\.\.<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier\.
+
before try_compile with CMP0066 WARN-default
after try_compile with CMP0066 WARN-default