diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-19 22:55:59 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-31 15:37:47 (GMT) |
commit | c9ca5f6326136d02c8d12b0a749076ff375dae4c (patch) | |
tree | ed631bddd296a08787bca2bb0d2cd87e347d1b03 /Help/command | |
parent | 07551f35de4e5d4aef40f1646f699785ab741128 (diff) | |
download | CMake-c9ca5f6326136d02c8d12b0a749076ff375dae4c.zip CMake-c9ca5f6326136d02c8d12b0a749076ff375dae4c.tar.gz CMake-c9ca5f6326136d02c8d12b0a749076ff375dae4c.tar.bz2 |
cmCoreTryCompile: parse `SOURCES_TYPE` argument
This will serve to add context for the source listing in order to
properly mark sources as `FILE_SET TYPE CXX_MODULES` in the generated
code.
Diffstat (limited to 'Help/command')
-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> | |