diff options
author | Brad King <brad.king@kitware.com> | 2021-10-12 13:37:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-10-12 13:38:01 (GMT) |
commit | 6f1fe83f865edb276aa78dd9f5dda1dbebcf21e3 (patch) | |
tree | d68d433bd20688d187bd03013424407fd15749bf /Source | |
parent | 5449001cccb7efa552df0ee949cd3e976fef7e07 (diff) | |
parent | 40ade51cc8eb1b1567b43810a9dd7c592c4c6d2e (diff) | |
download | CMake-6f1fe83f865edb276aa78dd9f5dda1dbebcf21e3.zip CMake-6f1fe83f865edb276aa78dd9f5dda1dbebcf21e3.tar.gz CMake-6f1fe83f865edb276aa78dd9f5dda1dbebcf21e3.tar.bz2 |
Merge topic 'post-rel-dev'
40ade51cc8 Configure CMake itself with policies through CMake 3.21
b3248c083f export: Increase maximum policy version in exported files to 3.21
0f31463c37 Add deprecation warnings for policies CMP0094 and below
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6615
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 8ca9a66..c0a4cdc 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -924,13 +924,13 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os) // Isolate the file policy level. // Support CMake versions as far back as 2.6 but also support using NEW - // policy settings for up to CMake 3.20 (this upper limit may be reviewed + // policy settings for up to CMake 3.21 (this upper limit may be reviewed // and increased from time to time). This reduces the opportunity for CMake // warnings when an older export file is later used with newer CMake // versions. /* clang-format off */ os << "cmake_policy(PUSH)\n" - << "cmake_policy(VERSION 2.6...3.20)\n"; + << "cmake_policy(VERSION 2.6...3.21)\n"; /* clang-format on */ } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 83984f7..23b97ed 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4427,11 +4427,12 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id, } // Deprecate old policies. - if (status == cmPolicies::OLD && id <= cmPolicies::CMP0088 && + if (status == cmPolicies::OLD && id <= cmPolicies::CMP0094 && !(this->GetCMakeInstance()->GetIsInTryCompile() && ( // Policies set by cmCoreTryCompile::TryCompileCode. - id == cmPolicies::CMP0065 || id == cmPolicies::CMP0083))) { + id == cmPolicies::CMP0065 || id == cmPolicies::CMP0083 || + id == cmPolicies::CMP0091))) { this->IssueMessage(MessageType::DEPRECATION_WARNING, cmPolicies::GetPolicyDeprecatedWarning(id)); } |