diff options
author | Brad King <brad.king@kitware.com> | 2022-10-12 15:52:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-12 16:40:52 (GMT) |
commit | c0e8bb5150b98a8003181b32396d0f3609bc6fce (patch) | |
tree | fce1f1f55cd951ba8db6c86359e123b244856c40 /Source/cmMakefile.cxx | |
parent | f6af01b53d2531167d7bb11ef53df889735bf97b (diff) | |
download | CMake-c0e8bb5150b98a8003181b32396d0f3609bc6fce.zip CMake-c0e8bb5150b98a8003181b32396d0f3609bc6fce.tar.gz CMake-c0e8bb5150b98a8003181b32396d0f3609bc6fce.tar.bz2 |
Add deprecation warnings for policies CMP0108 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.18 and below to encourage projects to port
away from setting policies to OLD.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6e0d704..4100d1f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4470,12 +4470,12 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id, } // Deprecate old policies. - if (status == cmPolicies::OLD && id <= cmPolicies::CMP0102 && + if (status == cmPolicies::OLD && id <= cmPolicies::CMP0108 && !(this->GetCMakeInstance()->GetIsInTryCompile() && ( // Policies set by cmCoreTryCompile::TryCompileCode. id == cmPolicies::CMP0065 || id == cmPolicies::CMP0083 || - id == cmPolicies::CMP0091)) && + id == cmPolicies::CMP0091 || id == cmPolicies::CMP0104)) && (!this->IsSet("CMAKE_WARN_DEPRECATED") || this->IsOn("CMAKE_WARN_DEPRECATED"))) { this->IssueMessage(MessageType::DEPRECATION_WARNING, |