Commit ea6b656f authored by Brad King's avatar Brad King
Browse files

Help: Format execute_process command documentation

Use a code-block for the signature.  Format the options as a definition
list.
parent 9fc158b6
...@@ -3,7 +3,7 @@ execute_process ...@@ -3,7 +3,7 @@ execute_process
Execute one or more child processes. Execute one or more child processes.
:: .. code-block:: cmake
execute_process(COMMAND <cmd1> [args1...]] execute_process(COMMAND <cmd1> [args1...]]
[COMMAND <cmd2> [args2...] [...]] [COMMAND <cmd2> [args2...] [...]]
...@@ -21,28 +21,41 @@ Execute one or more child processes. ...@@ -21,28 +21,41 @@ Execute one or more child processes.
[ERROR_STRIP_TRAILING_WHITESPACE]) [ERROR_STRIP_TRAILING_WHITESPACE])
Runs the given sequence of one or more commands with the standard Runs the given sequence of one or more commands with the standard
output of each process piped to the standard input of the next. A output of each process piped to the standard input of the next.
single standard error pipe is used for all processes. If A single standard error pipe is used for all processes.
WORKING_DIRECTORY is given the named directory will be set as the
current working directory of the child processes. If TIMEOUT is given Options:
the child processes will be terminated if they do not finish in the
specified number of seconds (fractions are allowed). If WORKING_DIRECTORY
RESULT_VARIABLE is given the variable will be set to contain the The named directory will be set as the current working directory of
result of running the processes. This will be an integer return code the child processes.
from the last child or a string describing an error condition. If
OUTPUT_VARIABLE or ERROR_VARIABLE are given the variable named will be TIMEOUT
set with the contents of the standard output and standard error pipes The child processes will be terminated if they do not finish in the
respectively. If the same variable is named for both pipes their specified number of seconds (fractions are allowed).
output will be merged in the order produced. If INPUT_FILE,
OUTPUT_FILE, or ERROR_FILE is given the file named will be attached to RESULT_VARIABLE
the standard input of the first process, standard output of the last The variable will be set to contain the result of running the processes.
process, or standard error of all processes respectively. If This will be an integer return code from the last child or a string
OUTPUT_QUIET or ERROR_QUIET is given then the standard output or describing an error condition.
standard error results will be quietly ignored. If more than one
OUTPUT_* or ERROR_* option is given for the same pipe the precedence OUTPUT_VARIABLE, ERROR_VARIABLE
is not specified. If no OUTPUT_* or ERROR_* options are given the The variable named will be set with the contents of the standard output
output will be shared with the corresponding pipes of the CMake and standard error pipes, respectively. If the same variable is named
process itself. for both pipes their output will be merged in the order produced.
The execute_process command is a newer more powerful version of INPUT_FILE, OUTPUT_FILE, ERROR_FILE
exec_program, but the old command has been kept for compatibility. The file named will be attached to the standard input of the first
process, standard output of the last process, or standard error of
all processes, respectively.
OUTPUT_QUIET, ERROR_QUIET
The standard output or standard error results will be quietly ignored.
If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the
same pipe the precedence is not specified.
If no ``OUTPUT_*`` or ``ERROR_*`` options are given the output will
be shared with the corresponding pipes of the CMake process itself.
The :command:`execute_process` command is a newer more powerful version of
:command:`exec_program`, but the old command has been kept for compatibility.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment