diff options
author | David Cole <david.cole@kitware.com> | 2011-12-01 19:03:24 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-12-01 19:03:24 (GMT) |
commit | 97142c76038606a1111918c1b5585d8e9caf1336 (patch) | |
tree | 2914beb70ceb4bfcde7525c4c8dcca8f22dfa54e /Source/cmConfigureFileCommand.cxx | |
parent | 333fd1131c539e60a8da6ad1e8516009eabf11c2 (diff) | |
parent | ac2e45d0893dd283c04c600e626bf80ea57d4a71 (diff) | |
download | CMake-97142c76038606a1111918c1b5585d8e9caf1336.zip CMake-97142c76038606a1111918c1b5585d8e9caf1336.tar.gz CMake-97142c76038606a1111918c1b5585d8e9caf1336.tar.bz2 |
Merge topic 'newline-style'
ac2e45d Provide std::ios_base typedef on GCC < 3
28c46ca cmNewLineStyle: Use cmStandardIncludes.h
75e83e9 cmNewLineStyle: Remove trailing comma in enum
be6502c bootstrap: Include cmNewLineStyle in build
a087490 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); } |