From 70c26a65b72c3ade0e6bd79dd0d0802e7e4770f8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 11:45:15 -0400 Subject: Help: Clarify execute_process OS-specific command-line encoding Issue: #23557 --- Help/command/execute_process.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Help/command/execute_process.rst b/Help/command/execute_process.rst index 82fcd46..d4ba465 100644 --- a/Help/command/execute_process.rst +++ b/Help/command/execute_process.rst @@ -37,8 +37,15 @@ Options: ``COMMAND`` A child process command line. - CMake executes the child process using operating system APIs directly. - All arguments are passed VERBATIM to the child process. + CMake executes the child process using operating system APIs directly: + + * On POSIX platforms, the command line is passed to the + child process in an ``argv[]`` style array. + + * On Windows platforms, the command line is encoded as a string such + that child processes using ``CommandLineToArgvW`` will decode the + original arguments. + No intermediate shell is used, so shell operators such as ``>`` are treated as normal arguments. (Use the ``INPUT_*``, ``OUTPUT_*``, and ``ERROR_*`` options to -- cgit v0.12