try_run: Allow to set working directory

Fixes: #17634
This commit is contained in:
Asit Dhal
2021-01-31 17:57:39 +01:00
parent af695cee73
commit 5af38a11ce
6 changed files with 43 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ Try Compiling and Running Source Files
[COMPILE_OUTPUT_VARIABLE <var>]
[RUN_OUTPUT_VARIABLE <var>]
[OUTPUT_VARIABLE <var>]
[WORKING_DIRECTORY <var>]
[ARGS <args>...])
Try compiling a ``<srcfile>``. Returns ``TRUE`` or ``FALSE`` for success
@@ -74,6 +75,12 @@ The options are:
``RUN_OUTPUT_VARIABLE <var>``
Report the output from running the executable in a given variable.
``WORKING_DIRECTORY <var>``
.. versionadded:: 3.20
Run the executable in the given directory. If no ``WORKING_DIRECTORY`` is
specified, the executable will run in ``<bindir>``.
Other Behavior Settings
^^^^^^^^^^^^^^^^^^^^^^^