diff options
author | Brad King <brad.king@kitware.com> | 2023-02-09 14:35:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-11 11:25:11 (GMT) |
commit | 3a4791548dfeb69e645e8fea8e669473d4f868cf (patch) | |
tree | cacff3748cdff410a5e0e6219db92f4b83535806 /Source/cmPolicies.cxx | |
parent | 1edf1385064d67885bafe09d472f82bf62d34641 (diff) | |
download | CMake-3a4791548dfeb69e645e8fea8e669473d4f868cf.zip CMake-3a4791548dfeb69e645e8fea8e669473d4f868cf.tar.gz CMake-3a4791548dfeb69e645e8fea8e669473d4f868cf.tar.bz2 |
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 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index da5f5e5..d5e5725 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -259,8 +259,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, { // Warn about policy versions for which support will be removed. if (warnCompat == WarnCompat::On && - (majorVer < 2 || (majorVer == 2 && minorVer < 8) || - (majorVer == 2 && minorVer == 8 && patchVer < 12)) && + (majorVer < 3 || (majorVer == 3 && minorVer < 5)) && // Avoid warning on calls generated by install(EXPORT) // in CMake versions prior to 3.18. !(majorVer == 2 && minorVer == 6 && patchVer == 0 && @@ -269,7 +268,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, "cmake_policy") == 0)) { mf->IssueMessage( MessageType::DEPRECATION_WARNING, - "Compatibility with CMake < 2.8.12 will be removed from " + "Compatibility with CMake < 3.5 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 " |