diff options
author | Brad King <brad.king@kitware.com> | 2020-06-12 12:41:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-18 13:52:05 (GMT) |
commit | 5845c218d771b517aa4294f0a90267e6f3f64891 (patch) | |
tree | 496f8fae5d48677d97df29b082771aa31fe76218 /Source/cmMakefile.cxx | |
parent | 7b07ccdd2b8d621211ee1642e8b62b005b0cd60f (diff) | |
download | CMake-5845c218d771b517aa4294f0a90267e6f3f64891.zip CMake-5845c218d771b517aa4294f0a90267e6f3f64891.tar.gz CMake-5845c218d771b517aa4294f0a90267e6f3f64891.tar.bz2 |
Deprecate compatibility with CMake versions older than 2.8.12
Issue a deprecation warning on calls to `cmake_minimum_required` or
`cmake_policy` that set policies based on versions older than 2.8.12.
Note that the effective policy version includes `...<max>` treatment.
This is important in combination with commit ca24b70d31 (Export: Specify
a policy range in exported files, 2020-05-16, v3.18.0-rc1~133^2).
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 3c1cba2..891e290 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1659,7 +1659,8 @@ void cmMakefile::Configure() this->SetCheckCMP0000(true); // Implicitly set the version for the user. - this->SetPolicyVersion("2.4", std::string()); + cmPolicies::ApplyPolicyVersion(this, 2, 4, 0, + cmPolicies::WarnCompat::Off); } } bool hasProject = false; @@ -4621,7 +4622,8 @@ void cmMakefile::PopSnapshot(bool reportError) bool cmMakefile::SetPolicyVersion(std::string const& version_min, std::string const& version_max) { - return cmPolicies::ApplyPolicyVersion(this, version_min, version_max); + return cmPolicies::ApplyPolicyVersion(this, version_min, version_max, + cmPolicies::WarnCompat::On); } bool cmMakefile::HasCMP0054AlreadyBeenReported( |