diff options
author | Brad King <brad.king@kitware.com> | 2022-09-16 14:26:17 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-09-16 14:26:27 (GMT) |
commit | 343685869716b2ac31876d3e4173ece46ea49efc (patch) | |
tree | c1b23bf88a62fc726bca761d9087cf604fa437ea /Help | |
parent | ed8e860998216216ef74bb93b35404c435a44f26 (diff) | |
parent | 56ae40cc59b74d7d4cf4c00cf35badec6aea2274 (diff) | |
download | CMake-343685869716b2ac31876d3e4173ece46ea49efc.zip CMake-343685869716b2ac31876d3e4173ece46ea49efc.tar.gz CMake-343685869716b2ac31876d3e4173ece46ea49efc.tar.bz2 |
Merge topic 'try_compile-new-project-signature'
56ae40cc59 try_compile: Add PROJECT keyword-dispatched signature
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7677
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/try_compile.rst | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst index 710fd21..97ad481 100644 --- a/Help/command/try_compile.rst +++ b/Help/command/try_compile.rst @@ -14,10 +14,15 @@ Try Compiling Whole Projects .. code-block:: cmake - try_compile(<resultVar> <bindir> <srcdir> - <projectName> [<targetName>] [CMAKE_FLAGS <flags>...] + try_compile(<resultVar> PROJECT <projectName> + SOURCE_DIR <srcdir> + [BINARY_DIR <bindir>] + [TARGET <targetName>] + [CMAKE_FLAGS <flags>...] [OUTPUT_VARIABLE <var>]) +.. versionadded:: 3.25 + Try building a project. The success or failure of the ``try_compile``, i.e. ``TRUE`` or ``FALSE`` respectively, is returned in ``<resultVar>``. @@ -34,6 +39,15 @@ below for the meaning of other options. Previously this was only done by the :ref:`source file <Try Compiling Source Files>` signature. +This command also supports an alternate signature +which was present in older versions of CMake: + +.. code-block:: cmake + + try_compile(<resultVar> <bindir> <srcdir> + <projectName> [<targetName>] [CMAKE_FLAGS <flags>...] + [OUTPUT_VARIABLE <var>]) + .. _`Try Compiling Source Files`: Try Compiling Source Files |