Explorar o código

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 <[email protected]>
Brad King %!s(int64=8) %!d(string=hai) anos
pai
achega
07c3380a6e
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      Help/command/execute_process.rst
  2. 1 1
      Source/cmExecuteProcessCommand.cxx

+ 1 - 1
Help/command/execute_process.rst

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

+ 1 - 1
Source/cmExecuteProcessCommand.cxx

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