Add NEWLINE_STYLE option to configure_file (#3957)

This commit is contained in:
Peter Kuemmel
2011-11-20 14:04:11 +01:00
committed by Brad King
parent 6580434f16
commit a087490697
12 changed files with 225 additions and 7 deletions
+14 -1
View File
@@ -65,6 +65,12 @@ bool cmConfigureFileCommand
cmSystemTools::SetFatalErrorOccured();
return false;
}
std::string errorMessage;
if (!this->NewLineStyle.ReadFromArguments(args, errorMessage))
{
this->SetError(errorMessage.c_str());
return false;
}
this->CopyOnly = false;
this->EscapeQuotes = false;
@@ -78,6 +84,12 @@ bool cmConfigureFileCommand
if(args[i] == "COPYONLY")
{
this->CopyOnly = true;
if (this->NewLineStyle.IsValid())
{
this->SetError("COPYONLY could not be used in combination "
"with NEWLINE_STYLE");
return false;
}
}
else if(args[i] == "ESCAPE_QUOTES")
{
@@ -122,7 +134,8 @@ int cmConfigureFileCommand::ConfigureFile()
this->OutputFile.c_str(),
this->CopyOnly,
this->AtOnly,
this->EscapeQuotes);
this->EscapeQuotes,
this->NewLineStyle);
}