1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-23 00:48:55 +08:00

execute_process: Restore no-decoding default behavior

Since commit v3.8.0-rc1~232^2 (execute_process: Add ENCODING option for
Windows child process output, 2016-11-23) we decode child process output
using the console's active codepage by default.  This differs from
previous versions of CMake and is therefore incompatible.  Changing this
default will require a policy, so for now revert the default behavior
back to performing no decoding.

Reported-by: Nils Gladitz <nilsgladitz@gmail.com>
This commit is contained in:
Brad King
2017-02-13 13:49:14 -05:00
parent 4168bc184e
commit 07c3380a6e
2 changed files with 2 additions and 2 deletions

View File

@@ -75,10 +75,10 @@ Options:
``NONE``
Perform no decoding. This assumes that the process output is encoded
in the same way as CMake's internal encoding (UTF-8).
This is the default.
``AUTO``
Use the current active console's codepage or if that isn't
available then use ANSI.
This is the default.
``ANSI``
Use the ANSI codepage.
``OEM``

View File

@@ -47,7 +47,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
std::string error_variable;
std::string result_variable;
std::string working_directory;
cmProcessOutput::Encoding encoding = cmProcessOutput::Auto;
cmProcessOutput::Encoding encoding = cmProcessOutput::None;
for (size_t i = 0; i < args.size(); ++i) {
if (args[i] == "COMMAND") {
doing_command = true;