diff options
author | Brad King <brad.king@kitware.com> | 2023-08-07 15:56:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-08-07 15:57:00 (GMT) |
commit | efb21962fbb64a4a8b415c26ab50d60ef0af3ad3 (patch) | |
tree | 7559df765b57b8ac9252bb78f06d46d2a02489a2 /Help | |
parent | e468a6dd407b5cc44c504de521b8c8b94c3f5525 (diff) | |
parent | be53c7585281e67ba06969e2f83aa487579d1daa (diff) | |
download | CMake-efb21962fbb64a4a8b415c26ab50d60ef0af3ad3.zip CMake-efb21962fbb64a4a8b415c26ab50d60ef0af3ad3.tar.gz CMake-efb21962fbb64a4a8b415c26ab50d60ef0af3ad3.tar.bz2 |
Merge topic 'cxxmodules-try-compile'
be53c75852 cmExperimental: recycle the C++ modules API UUID
deb1c3cbd5 cmCoreTryCompile: forward module-related binutils variables
b768d293c5 cmCoreTryCompile: use the source type context for source files
93993c7ad4 cmArgumentParser: support storing a context value with parsing
c9ca5f6326 cmCoreTryCompile: parse `SOURCES_TYPE` argument
07551f35de cmCoreTryCompile: use `target_sources` for `try_compile` targets
aad9033b56 cmExperimental: support forwarding associated variables to `try_compile`
f6cf433256 cmExperimental: only forward C++ module support to non-ABI checks
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8639
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/try_compile.rst | 22 | ||||
-rw-r--r-- | Help/command/try_run.rst | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst index 8abb6e0..fbc4221 100644 --- a/Help/command/try_compile.rst +++ b/Help/command/try_compile.rst @@ -65,6 +65,7 @@ Try Compiling Source Files .. code-block:: cmake try_compile(<compileResultVar> + [SOURCES_TYPE <type>] <SOURCES <srcfile...> | SOURCE_FROM_CONTENT <name> <content> | SOURCE_FROM_VAR <name> <var> | @@ -244,6 +245,27 @@ The options are: ``SOURCE_FROM_VAR`` may be specified multiple times. +``SOURCES_TYPE <type>`` + .. versionadded:: 3.28 + + Sources may be classified using the ``SOURCES_TYPE`` argument. Once + specified, all subsequent sources specified will be treated as that type + until another ``SOURCES_TYPE`` is given. Available types are: + + ``NORMAL`` + Sources are not added to any ``FILE_SET`` in the generated project. + + ``CXX_MODULE`` + Sources are added to a ``FILE_SET`` of type ``CXX_MODULES`` in the + generated project. + + .. note :: + + Experimental. Sources of type ``CXX_MODULE`` are gated by + ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` + + The default type of sources is ``NORMAL``. + ``<LANG>_STANDARD <std>`` .. versionadded:: 3.8 diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst index 3a4e203..d48ab3d 100644 --- a/Help/command/try_run.rst +++ b/Help/command/try_run.rst @@ -13,6 +13,7 @@ Try Compiling and Running Source Files .. code-block:: cmake try_run(<runResultVar> <compileResultVar> + [SOURCES_TYPE <type>] <SOURCES <srcfile...> | SOURCE_FROM_CONTENT <name> <content> | SOURCE_FROM_VAR <name> <var> | |