From 386465bf8396dca8d00448b23734bc5edafb17c8 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2022 13:56:33 -0400 Subject: cmTarget: add support for C++ module fileset types 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). --- Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst (limited to 'Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst') diff --git a/Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst b/Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst new file mode 100644 index 0000000000..f67a84886d --- /dev/null +++ b/Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst @@ -0,0 +1,18 @@ +CXX_MODULE_HEADER_UNIT_SET +-------------------------- + +.. note :: + + Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` + +Semicolon-separated list of files in the target's default C++ module header +set, (i.e. the file set with name and type ``CXX_MODULE_HEADER_UNITS``). If +any of the paths are relative, they are computed relative to the target's +source directory. The property supports +:manual:`generator expressions `. + +This property is normally only set by :command:`target_sources(FILE_SET)` +rather than being manipulated directly. + +See :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET_` for the list of files in +other C++ module header sets. -- cgit v1.2.1