summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-12 13:37:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-12 13:38:01 (GMT)
commit6f1fe83f865edb276aa78dd9f5dda1dbebcf21e3 (patch)
treed68d433bd20688d187bd03013424407fd15749bf
parent5449001cccb7efa552df0ee949cd3e976fef7e07 (diff)
parent40ade51cc8eb1b1567b43810a9dd7c592c4c6d2e (diff)
downloadCMake-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
-rw-r--r--CMakeLists.txt2
-rw-r--r--Source/cmExportFileGenerator.cxx4
-rw-r--r--Source/cmMakefile.cxx5
-rw-r--r--Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt10
-rw-r--r--Utilities/Doxygen/CMakeLists.txt2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt2
8 files changed, 38 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fdfe456..a0eae59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-cmake_minimum_required(VERSION 3.1...3.20 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1...3.21 FATAL_ERROR)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
project(CMake)
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));
}
diff --git a/Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt b/Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt
new file mode 100644
index 0000000..899122e
--- /dev/null
+++ b/Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0093-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0093 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt b/Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt
new file mode 100644
index 0000000..3984a78
--- /dev/null
+++ b/Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0091-OLD.cmake:[0-9] \(cmake_policy\):
+ The OLD behavior for policy CMP0091 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt b/Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt
new file mode 100644
index 0000000..535b997
--- /dev/null
+++ b/Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0092-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0092 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index 69b4e2f..72cfc05 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeDeveloperReference_STANDALONE 1)
- cmake_minimum_required(VERSION 3.1...3.20 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1...3.21 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index c8a970d..165d557 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeHelp_STANDALONE 1)
- cmake_minimum_required(VERSION 3.1...3.20 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1...3.21 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)