summaryrefslogtreecommitdiffstats
path: root/Source/cmConfigureFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-18 15:25:49 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-23 12:54:31 (GMT)
commit7d47c693650672afabc46bd200246eb9130582d6 (patch)
tree0a1ad731d0622c629584a6518e124dfb8e7b5661 /Source/cmConfigureFileCommand.cxx
parentc7c44fc7f4a32163b9fd82e5560fa35df60d2fb4 (diff)
downloadCMake-7d47c693650672afabc46bd200246eb9130582d6.zip
CMake-7d47c693650672afabc46bd200246eb9130582d6.tar.gz
CMake-7d47c693650672afabc46bd200246eb9130582d6.tar.bz2
Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
Diffstat (limited to 'Source/cmConfigureFileCommand.cxx')
-rw-r--r--Source/cmConfigureFileCommand.cxx25
1 files changed, 4 insertions, 21 deletions
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index e52ddef..f8ec642 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -74,10 +74,6 @@ 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 = !this->Makefile->NeedBackwardsCompatibility(2,0);
-
this->AtOnly = false;
for(unsigned int i=2;i < args.size();++i)
{
@@ -101,32 +97,19 @@ bool cmConfigureFileCommand
}
else if(args[i] == "IMMEDIATE")
{
- this->Immediate = true;
+ /* Ignore legacy option. */
}
}
- // If we were told to copy the file immediately, then do it on the
- // first pass (now).
- if(this->Immediate)
+ if ( !this->ConfigureFile() )
{
- if ( !this->ConfigureFile() )
- {
- this->SetError("Problem configuring file");
- return false;
- }
+ this->SetError("Problem configuring file");
+ return false;
}
return true;
}
-void cmConfigureFileCommand::FinalPass()
-{
- if(!this->Immediate)
- {
- this->ConfigureFile();
- }
-}
-
int cmConfigureFileCommand::ConfigureFile()
{
return this->Makefile->ConfigureFile(