diff options
author | Peter Kuemmel <syntheticpp@gmx.net> | 2011-11-20 13:04:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-11-28 18:48:59 (GMT) |
commit | a087490697c416d429d30fdf389cca2f13d9d14e (patch) | |
tree | cad0b1147f3451b012f0b4d2cd474452721315fb /Source/cmConfigureFileCommand.cxx | |
parent | 6580434f16cf4c6db1fde6d804e95d40f27c0f45 (diff) | |
download | CMake-a087490697c416d429d30fdf389cca2f13d9d14e.zip CMake-a087490697c416d429d30fdf389cca2f13d9d14e.tar.gz CMake-a087490697c416d429d30fdf389cca2f13d9d14e.tar.bz2 |
Add NEWLINE_STYLE option to configure_file (#3957)
Diffstat (limited to 'Source/cmConfigureFileCommand.cxx')
-rw-r--r-- | Source/cmConfigureFileCommand.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index c1327fb..ea98326 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -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); } |