summaryrefslogtreecommitdiff
path: root/Source/cmConfigureFileCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-03-05 11:41:25 -0500
committerKen Martin <ken.martin@kitware.com>2008-03-05 11:41:25 -0500
commitf2c6e9e4809c9a85293bd9d01183c99c4598c403 (patch)
treed81943651ce0baea6912f13893817c28a9df3143 /Source/cmConfigureFileCommand.cxx
parent7173f2db0e37a1621236b3ceeb883d4f1255ee42 (diff)
downloadcmake-f2c6e9e4809c9a85293bd9d01183c99c4598c403.tar.gz
BUG: some fixes, still a few to go
Diffstat (limited to 'Source/cmConfigureFileCommand.cxx')
-rw-r--r--Source/cmConfigureFileCommand.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index 2a8d3a4d18..f2ce3daec6 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -42,15 +42,19 @@ bool cmConfigureFileCommand
// 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;
- }
-
+ // after 2.0 it only does InitialPass, this is policy CMP_0003
+ switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP_0003))
+ {
+ case cmPolicies::WARN:
+ cmSystemTools::Message(
+ this->Makefile->GetPolicies()->GetPolicyWarning
+ (cmPolicies::CMP_0003).c_str(),"Warning");
+ case cmPolicies::OLD:
+ this->Immediate = false;
+ break;
+ default:
+ this->Immediate = true;
+ }
this->AtOnly = false;
for(unsigned int i=2;i < args.size();++i)