diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-06 00:10:25 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-25 12:48:37 (GMT) |
commit | 5447ca1a94309fa394be3a8233090b33e81e4c9f (patch) | |
tree | adfd7aeeb174bffb6a739847e2a01f03351fd20f /Source/cmCMakePolicyCommand.cxx | |
parent | d0dcce15f4cc4e7c100556fbd016c59f64d0d238 (diff) | |
download | CMake-5447ca1a94309fa394be3a8233090b33e81e4c9f.zip CMake-5447ca1a94309fa394be3a8233090b33e81e4c9f.tar.gz CMake-5447ca1a94309fa394be3a8233090b33e81e4c9f.tar.bz2 |
cmMakefile: Remove CMP0001 handling to callers.
Diffstat (limited to 'Source/cmCMakePolicyCommand.cxx')
-rw-r--r-- | Source/cmCMakePolicyCommand.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 3c878bf..3ef6d35 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -93,6 +93,22 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector<std::string> const& args) this->SetError("SET failed to set policy."); return false; } + if(args[1] == "CMP0001" && + (status == cmPolicies::WARN || status == cmPolicies::OLD)) + { + if(!(this->Makefile->GetState() + ->GetInitializedCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))) + { + // Set it to 2.4 because that is the last version where the + // variable had meaning. + this->Makefile->AddCacheDefinition + ("CMAKE_BACKWARDS_COMPATIBILITY", "2.4", + "For backwards compatibility, what version of CMake " + "commands and " + "syntax should this version of CMake try to support.", + cmState::STRING); + } + } return true; } |