diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst index 93713da532..8ecfd36c6b 100644 --- a/Help/command/try_compile.rst +++ b/Help/command/try_compile.rst @@ -92,10 +92,11 @@ Try Compiling Source Files .. versionadded:: 3.25 -Try building an executable or static library from one or more source files -(which one is determined by the :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` -variable). Build success returns ``TRUE`` and build failure returns ``FALSE`` -in ````. +Try building an executable or static library from one or more source files. +The binary type is determined by variable +:variable:`CMAKE_TRY_COMPILE_TARGET_TYPE`. +Build success returns boolean ``true`` and build failure returns boolean +``false`` in ```` (cached unless ``NO_CACHE`` is specified). In this form, one or more source files must be provided. Additionally, one of ``SOURCES`` and/or ``SOURCE_FROM_*`` must precede other keywords. @@ -211,9 +212,10 @@ The options for the above signatures are: ``NO_CACHE`` .. versionadded:: 3.25 - The result will be stored in a normal variable rather than a cache entry. + ```` will be stored in a normal variable rather than a + cache entry. - The result variable is normally cached so that a simple pattern can be used + ```` is normally cached so that a simple pattern can be used to avoid repeating the test on subsequent executions of CMake: .. code-block:: cmake diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst index c466a81a87..f14a5c2ccf 100644 --- a/Help/command/try_run.rst +++ b/Help/command/try_run.rst @@ -40,13 +40,14 @@ Try Compiling and Running Source Files .. versionadded:: 3.25 Try building an executable from one or more source files. Build success -returns ``TRUE`` and build failure returns ``FALSE`` in ````. -If the build succeeds, this runs the executable and stores the exit code in -````. If the executable was built, but failed to run, then -```` will be set to ``FAILED_TO_RUN``. See command -:command:`try_compile` for documentation of options common to both commands, -and for information on how the test project is constructed to build the source -file. +returns boolean ``true`` and build failure returns boolean ``false`` in +```` (cached unless ``NO_CACHE`` is specified). +If the build succeeds, this runs the executable and stores the exit code +in ```` (cached unless ``NO_CACHE`` is specified). +If the executable was built, but failed to run, then ```` +will be set to ``FAILED_TO_RUN``. See command :command:`try_compile` for +documentation of options common to both commands, and for information on +how the test project is constructed to build the source file. One or more source files must be provided. Additionally, one of ``SOURCES`` and/or ``SOURCE_FROM_*`` must precede other keywords.