diff options
author | Patrick Northon <northon_patrick3@yahoo.ca> | 2022-07-08 19:49:02 (GMT) |
---|---|---|
committer | Patrick Northon <northon_patrick3@yahoo.ca> | 2022-07-08 19:49:02 (GMT) |
commit | a2cd0687db1afec58d5f42a94bb85b2e2ce301fe (patch) | |
tree | 8297ac568aeab79b1b1e7148881dc38aa75d2ad5 /Help/command/try_run.rst | |
parent | fc30196e76dcbc47f045b451adbab643a2387700 (diff) | |
download | CMake-a2cd0687db1afec58d5f42a94bb85b2e2ce301fe.zip CMake-a2cd0687db1afec58d5f42a94bb85b2e2ce301fe.tar.gz CMake-a2cd0687db1afec58d5f42a94bb85b2e2ce301fe.tar.bz2 |
try_run: Add RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE.
Diffstat (limited to 'Help/command/try_run.rst')
-rw-r--r-- | Help/command/try_run.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst index fc41cdd..125b0ac 100644 --- a/Help/command/try_run.rst +++ b/Help/command/try_run.rst @@ -19,6 +19,8 @@ Try Compiling and Running Source Files [LINK_LIBRARIES <libs>...] [COMPILE_OUTPUT_VARIABLE <var>] [RUN_OUTPUT_VARIABLE <var>] + [RUN_OUTPUT_STDOUT_VARIABLE <var>] + [RUN_OUTPUT_STDERR_VARIABLE <var>] [OUTPUT_VARIABLE <var>] [WORKING_DIRECTORY <var>] [ARGS <args>...]) @@ -70,6 +72,16 @@ The options are: ``RUN_OUTPUT_VARIABLE <var>`` Report the output from running the executable in a given variable. +``RUN_OUTPUT_STDOUT_VARIABLE <var>`` + .. versionadded:: 3.25 + + Report the output of stdout from running the executable in a given variable. + +``RUN_OUTPUT_STDERR_VARIABLE <var>`` + .. versionadded:: 3.25 + + Report the output of stderr from running the executable in a given variable. + ``WORKING_DIRECTORY <var>`` .. versionadded:: 3.20 @@ -110,6 +122,7 @@ These cache entries are: In order to make cross compiling your project easier, use ``try_run`` only if really required. If you use ``try_run``, use the +``RUN_OUTPUT_STDOUT_VARIABLE``, ``RUN_OUTPUT_STDERR_VARIABLE``, ``RUN_OUTPUT_VARIABLE`` or ``OUTPUT_VARIABLE`` options only if really required. Using them will require that when cross-compiling, the cache variables will have to be set manually to the output of the executable. |