mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
execute_process: Add option to get results of every child
Add a `RESULTS_VARIABLE` option to get the results of all children in a pipeline of one or more `COMMAND`s.
This commit is contained in:
@@ -10,6 +10,7 @@ Execute one or more child processes.
|
||||
[WORKING_DIRECTORY <directory>]
|
||||
[TIMEOUT <seconds>]
|
||||
[RESULT_VARIABLE <variable>]
|
||||
[RESULTS_VARIABLE <variable>]
|
||||
[OUTPUT_VARIABLE <variable>]
|
||||
[ERROR_VARIABLE <variable>]
|
||||
[INPUT_FILE <file>]
|
||||
@@ -49,10 +50,16 @@ Options:
|
||||
specified number of seconds (fractions are allowed).
|
||||
|
||||
``RESULT_VARIABLE``
|
||||
The variable will be set to contain the result of running the processes.
|
||||
The variable will be set to contain the result of last child process.
|
||||
This will be an integer return code from the last child or a string
|
||||
describing an error condition.
|
||||
|
||||
``RESULTS_VARIABLE <variable>``
|
||||
The variable will be set to contain the result of all processes as a
|
||||
:ref:`;-list <CMake Language Lists>`, in order of the given ``COMMAND``
|
||||
arguments. Each entry will be an integer return code from the
|
||||
corresponding child or a string describing an error condition.
|
||||
|
||||
``OUTPUT_VARIABLE``, ``ERROR_VARIABLE``
|
||||
The variable named will be set with the contents of the standard output
|
||||
and standard error pipes, respectively. If the same variable is named
|
||||
|
||||
Reference in New Issue
Block a user