diff options
author | Brad King <brad.king@kitware.com> | 2023-06-07 14:38:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-06-07 18:31:50 (GMT) |
commit | 9ba9b6c658dd086129687e0345e5968b60051ca7 (patch) | |
tree | 684b7fa4fcce59223f1e394aa2fd24d04e836ec9 /Source/cmMakefile.cxx | |
parent | bb08c70e019f50a6031028b9ea27a1e9bb75430f (diff) | |
download | CMake-9ba9b6c658dd086129687e0345e5968b60051ca7.zip CMake-9ba9b6c658dd086129687e0345e5968b60051ca7.tar.gz CMake-9ba9b6c658dd086129687e0345e5968b60051ca7.tar.bz2 |
Add deprecation warnings for policies CMP0120 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.20 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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0af0ed0..c3c8d46 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4613,7 +4613,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id, } // Deprecate old policies. - if (status == cmPolicies::OLD && id <= cmPolicies::CMP0114 && + if (status == cmPolicies::OLD && id <= cmPolicies::CMP0120 && !(this->GetCMakeInstance()->GetIsInTryCompile() && ( // Policies set by cmCoreTryCompile::TryCompileCode. |