summaryrefslogtreecommitdiffstats
path: root/Source/cmConfigureFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-03-07 20:30:35 (GMT)
committerBrad King <brad.king@kitware.com>2008-03-07 20:30:35 (GMT)
commit5233b75a777b0f3379408291e6f32b0eb15c2f54 (patch)
tree538d48ac384f0129059e3e1c20f2a46e9a3949cf /Source/cmConfigureFileCommand.cxx
parentfcce2f3b61ca5a3484d41aa804dc09b39f16f8cf (diff)
downloadCMake-5233b75a777b0f3379408291e6f32b0eb15c2f54.zip
CMake-5233b75a777b0f3379408291e6f32b0eb15c2f54.tar.gz
CMake-5233b75a777b0f3379408291e6f32b0eb15c2f54.tar.bz2
ENH: Improve handling of old-style compatibility.
- Remove CMP_0001 (no slash in target name) and restore old CMAKE_BACKWARDS_COMPATIBILITY check for it - Replace all checks of CMAKE_BACKWARDS_COMPATIBILITY with cmLocalGenerator::NeedBackwardsCompatibility calls - Create new CMP_0001 to determine whether or not CMAKE_BACKWARDS_COMPATIBILITY is used. (old = use, new = ignore) - Show CMAKE_BACKWARDS_COMPATIBILITY in cache only when CMP_0001 is set to OLD or WARN - Update documentation of cmake_policy and cmake_minimum_required to indicate their relationship and the 2.4 version boundary - When no cmake policy version is set in top level makefile implicitly call cmake_policy(VERSION 2.4) which restores CMAKE_BACKWARDS_COMPATIBILITY and other 2.4 compatibility - Fix tests MakeClean and Preprocess to call cmake_policy(VERSION 2.6) because they depend on new policies
Diffstat (limited to 'Source/cmConfigureFileCommand.cxx')
-rw-r--r--Source/cmConfigureFileCommand.cxx21
1 files changed, 1 insertions, 20 deletions
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index d768886..cac2552 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -40,29 +40,10 @@ bool cmConfigureFileCommand
this->CopyOnly = false;
this->EscapeQuotes = false;
-
// for CMake 2.0 and earlier CONFIGURE_FILE defaults to the FinalPass,
// after 2.0 it only does InitialPass
- this->Immediate = false;
- const char* versionValue
- = this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
- if (versionValue && atof(versionValue) > 2.0)
- {
- this->Immediate = true;
- }
+ this->Immediate = !this->Makefile->NeedBackwardsCompatibility(2,0);
- switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP_0003))
- {
- case cmPolicies::WARN:
- case cmPolicies::OLD:
- break;
- case cmPolicies::NEW:
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- this->Immediate = true;
- }
-
-
this->AtOnly = false;
for(unsigned int i=2;i < args.size();++i)
{