diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2021-02-02 14:18:48 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2021-02-02 14:18:48 (GMT) |
commit | 05f16ca7eefad41cbb8d6a973f47fe7c1a488ae5 (patch) | |
tree | d3e9aa594804b4df093b9af5bccf0ffe32384533 /Source/cmFileCommand.cxx | |
parent | 8387aa20f2c8ba870a8349665e2469f0e064f0b2 (diff) | |
download | CMake-05f16ca7eefad41cbb8d6a973f47fe7c1a488ae5.zip CMake-05f16ca7eefad41cbb8d6a973f47fe7c1a488ae5.tar.gz CMake-05f16ca7eefad41cbb8d6a973f47fe7c1a488ae5.tar.bz2 |
file(CONFIGURE): Use text mode for default OUTPUT content
This affects only Windows where \n will be translated as \r\n
Fixes: #21769
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 5eff789..031e0d7 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -3122,12 +3122,14 @@ bool HandleConfigureCommand(std::vector<std::string> const& args, } std::string newLineCharacters = "\n"; + bool open_with_binary_flag = false; if (newLineStyle.IsValid()) { newLineCharacters = newLineStyle.GetCharacters(); + open_with_binary_flag = true; } cmGeneratedFileStream fout; - fout.Open(outputFile, false, true); + fout.Open(outputFile, false, open_with_binary_flag); if (!fout) { cmSystemTools::Error("Could not open file for write in copy operation " + outputFile); |