summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-02-06 21:49:14 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-06 22:07:09 (GMT)
commit9c5e981e607fdab1f7982c2ea555d69b3dca027f (patch)
treebf8cfa2b5c8705125972b0955beaaee368c0ea4b /Source/cmMakefile.cxx
parentb18165c2c68f58c00b4a70614c563c6713d44469 (diff)
downloadCMake-9c5e981e607fdab1f7982c2ea555d69b3dca027f.zip
CMake-9c5e981e607fdab1f7982c2ea555d69b3dca027f.tar.gz
CMake-9c5e981e607fdab1f7982c2ea555d69b3dca027f.tar.bz2
Add deprecation warnings for policies CMP0128 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.22 and below to encourage projects to port away from setting policies to OLD.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 509f28b..cfaac11 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4657,13 +4657,14 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
}
// Deprecate old policies.
- if (status == cmPolicies::OLD && id <= cmPolicies::CMP0126 &&
+ if (status == cmPolicies::OLD && id <= cmPolicies::CMP0128 &&
!(this->GetCMakeInstance()->GetIsInTryCompile() &&
(
// Policies set by cmCoreTryCompile::TryCompileCode.
id == cmPolicies::CMP0065 || id == cmPolicies::CMP0083 ||
id == cmPolicies::CMP0091 || id == cmPolicies::CMP0104 ||
- id == cmPolicies::CMP0123 || id == cmPolicies::CMP0126)) &&
+ id == cmPolicies::CMP0123 || id == cmPolicies::CMP0126 ||
+ id == cmPolicies::CMP0128)) &&
(!this->IsSet("CMAKE_WARN_DEPRECATED") ||
this->IsOn("CMAKE_WARN_DEPRECATED"))) {
this->IssueMessage(MessageType::DEPRECATION_WARNING,