mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
execute_process: Add option to echo command lines
Add COMMAND_ECHO option to the execute_process command. This will allow execute_process to show the command it will run. Also add a cmake variable CMAKE_EXECUTE_PROCESS_COMMAND_ECHO. Both the option and the variable can be set to one of the following: STDERR|STDOUT|NONE. The command will be printed to stderr or stdout or not at all. Fixes: #18933
This commit is contained in:
@@ -18,6 +18,7 @@ Execute one or more child processes.
|
||||
[ERROR_FILE <file>]
|
||||
[OUTPUT_QUIET]
|
||||
[ERROR_QUIET]
|
||||
[COMMAND_ECHO <where>]
|
||||
[OUTPUT_STRIP_TRAILING_WHITESPACE]
|
||||
[ERROR_STRIP_TRAILING_WHITESPACE]
|
||||
[ENCODING <name>])
|
||||
@@ -77,6 +78,10 @@ Options:
|
||||
``OUTPUT_QUIET``, ``ERROR_QUIET``
|
||||
The standard output or standard error results will be quietly ignored.
|
||||
|
||||
``COMMAND_ECHO <where>``
|
||||
The command being run will be echo'ed to ``<where>`` with ``<where>``
|
||||
being set to ``STDERR``|``STDOUT``|``NONE``.
|
||||
|
||||
``ENCODING <name>``
|
||||
On Windows, the encoding that is used to decode output from the process.
|
||||
Ignored on other platforms.
|
||||
|
||||
Reference in New Issue
Block a user