diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-02-24 06:13:45 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2019-02-24 06:16:07 (GMT) |
commit | 7975edeac5885634af347e6774e7928277d6bc17 (patch) | |
tree | 6a8a19cf2ffcb066c87674c1f4044f0fc62c2119 /Help/command/try_run.rst | |
parent | e6897c72e7c59f7a0b82ed19c1bdb40d42f7adaa (diff) | |
download | CMake-7975edeac5885634af347e6774e7928277d6bc17.zip CMake-7975edeac5885634af347e6774e7928277d6bc17.tar.gz CMake-7975edeac5885634af347e6774e7928277d6bc17.tar.bz2 |
Help: User-provided variable names for try_* commands
All uppercase is typically used for command keywords. Non-keyword
arguments should generally be shown as `<something>` according
to the CMake documentation guide.
Diffstat (limited to 'Help/command/try_run.rst')
-rw-r--r-- | Help/command/try_run.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst index 137402f..d401ebe 100644 --- a/Help/command/try_run.rst +++ b/Help/command/try_run.rst @@ -12,8 +12,8 @@ Try Compiling and Running Source Files .. code-block:: cmake - try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR - bindir srcfile [CMAKE_FLAGS <flags>...] + try_run(<runResultVar> <compileResultVar> + <bindir> <srcfile> [CMAKE_FLAGS <flags>...] [COMPILE_DEFINITIONS <defs>...] [LINK_OPTIONS <options>...] [LINK_LIBRARIES <libs>...] @@ -23,9 +23,9 @@ Try Compiling and Running Source Files [ARGS <args>...]) Try compiling a ``<srcfile>``. Returns ``TRUE`` or ``FALSE`` for success -or failure in ``COMPILE_RESULT_VAR``. If the compile succeeded, runs the -executable and returns its exit code in ``RUN_RESULT_VAR``. If the -executable was built, but failed to run, then ``RUN_RESULT_VAR`` will be +or failure in ``<compileResultVar>``. If the compile succeeded, runs the +executable and returns its exit code in ``<runResultVar>``. If the +executable was built, but failed to run, then ``<runResultVar>`` will be set to ``FAILED_TO_RUN``. See the :command:`try_compile` command for information on how the test project is constructed to build the source file. @@ -85,10 +85,10 @@ presetting them in some CMake script file to the values the executable would have produced if it had been run on its actual target platform. These cache entries are: -``<RUN_RESULT_VAR>`` +``<runResultVar>`` Exit code if the executable were to be run on the target platform. -``<RUN_RESULT_VAR>__TRYRUN_OUTPUT`` +``<runResultVar>__TRYRUN_OUTPUT`` Output from stdout and stderr if the executable were to be run on the target platform. This is created only if the ``RUN_OUTPUT_VARIABLE`` or ``OUTPUT_VARIABLE`` option was used. |