mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
386465bf83
C++ modules have two variants which are of importance to CMake:
- `CXX_MODULES`: interface modules (those using `export module M;`,
`export module M:part;`, or `module M:internal_part;`)
- `CXX_MODULE_HEADER_UNITS`: importable header units
Creating C++ modules or partitions are *not* supported in any other
source listing. This is because the source files must be installed (so
their scope matters), but not part of usage requirements (what it means
for a module source to be injected into a consumer is not clear at this
moment). Due to the way `FILE_SET` works with scopes, they are a perfect
fit as long as `INTERFACE` is not allowed (which it is not).
17 lines
563 B
ReStructuredText
17 lines
563 B
ReStructuredText
INTERFACE_CXX_MODULE_SETS
|
|
-------------------------
|
|
|
|
.. note ::
|
|
|
|
Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
|
|
|
|
Read-only list of the target's ``PUBLIC`` C++ module sets (i.e. all file sets
|
|
with the type ``CXX_MODULES``). Files listed in these C++ module sets can be
|
|
installed with :command:`install(TARGETS)` and exported with
|
|
:command:`install(EXPORT)` and :command:`export`.
|
|
|
|
C++ module sets may be defined using the :command:`target_sources` command
|
|
``FILE_SET`` option with type ``CXX_MODULES``.
|
|
|
|
See also :prop_tgt:`CXX_MODULE_SETS`.
|