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.h | |
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.h')
-rw-r--r-- | Source/cmConfigureFileCommand.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h index 844a23c..be33569 100644 --- a/Source/cmConfigureFileCommand.h +++ b/Source/cmConfigureFileCommand.h @@ -56,7 +56,8 @@ public: { return " configure_file(<input> <output>\n" - " [COPYONLY] [ESCAPE_QUOTES] [@ONLY])\n" + " [COPYONLY] [ESCAPE_QUOTES] [@ONLY] \n" + " [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])\n" "Copies a file <input> to file <output> and substitutes variable " "values referenced in the file content. " "If <input> is a relative path it is evaluated with respect to " @@ -81,14 +82,20 @@ public: "either #define VAR or /* #undef VAR */ depending on " "the setting of VAR in CMake. Any occurrences of #cmakedefine01 VAR " "will be replaced with either #define VAR 1 or #define VAR 0 " - "depending on whether VAR evaluates to TRUE or FALSE in CMake"; + "depending on whether VAR evaluates to TRUE or FALSE in CMake.\n" + "With NEWLINE_STYLE the line ending could be adjusted: \n" + " 'UNIX' or 'LF' for \\n, 'DOS', 'WIN32' or 'CRLF' for \\r\\n.\n" + "COPYONLY must not be used with NEWLINE_STYLE.\n"; } virtual void FinalPass(); virtual bool HasFinalPass() const { return !this->Immediate; } + private: int ConfigureFile(); + cmNewLineStyle NewLineStyle; + std::string InputFile; std::string OutputFile; bool CopyOnly; |