Commit Graph
11 Commits
Author SHA1 Message Date
Vito Gamberini 539b097bd8 CPS/c++modules: Use file system root as base directory for module manifests
Fixes: #27989
2026-07-26 16:34:33 -04:00
Brad King 9ba48c03f4 Merge topic 'mod-manifest-rel-path'
061d872ed1 c++modules: Fix relative paths in local-arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11784
2026-03-07 09:06:39 -05:00
Vito Gamberini 061d872ed1 c++modules: Fix relative paths in local-arguments
Fixes: #27426
2026-03-06 12:09:08 -05:00
Vito Gamberini df6b1f2997 c++modules: Restore use of local target for import std
Restore use of a project-local `STATIC` library to provide the stdlib's
module initialization symbols, as CMake 4.2's experimental support did.

In commit fa10dc6c22 (Experimental/CXXModules: Implement EcoStd Module
Metadata parser, 2025-10-21, v4.3.0-rc1~483^2) we switched to an
imported target to provide the BMI under the assumption that stdlib
implementations provide the symbols themselves, but they don't yet.

While refactoring the module metadata parser's properties logic, also
fix a relative path issue for local arguments.

Fixes: #27426, #27626, #27635
2026-03-04 16:45:23 -05:00
Vito Gamberini 3101d70902 c++modules: Restore use of local target for import std
Restore use of a project-local `STATIC` library to provide the stdlib's
module initialization symbols, as CMake 4.2's experimental support did.

In commit fa10dc6c22 (Experimental/CXXModules: Implement EcoStd Module
Metadata parser, 2025-10-21, v4.3.0-rc1~483^2) we switched to an
imported target to provide the BMI under the assumption that stdlib
implementations provide the symbols themselves, but they don't yet.

While refactoring the module metadata parser's properties logic, also
fix a relative path issue for local arguments.

Fixes: #27426, #27626, #27635
2026-03-04 16:40:37 -05:00
Marc Chevrier dee8799d16 FileSet management: Introduce dedicated classes for generation
To manage the generation step, introduce cmGeneratorFileSet and
cmGeneratorFileSets classes.
These reorganizations of the code are done in preparation of the
implementation of SOURCES file set type as well as user's file set types.

Issues: #27550, #27383
2026-02-19 17:35:56 +01:00
Marc Chevrier c4c84ae0f7 cmFileSet: Enhance type management
Type management is now dynamic to ensure future support of user's types.
2026-02-19 17:03:45 +01:00
Vito Gamberini e4cbf1c153 cmCxxModuleMetadata: Update PopulateTarget
* Use std::set for all imported properties to deduplicate properties
  across imported modules

* Normalize sourcepath
2026-01-28 18:38:57 -05:00
Vito Gamberini dddd0794c1 cmCxxModuleMetadata: Don't serialize default values
Serializing defaults inside each preprocessor define inflats manifest
size and makes auditing them more difficult. When "value" is empty
or "undef" is false, don't serialize them at all.
2026-01-22 00:59:48 -05:00
Vito Gamberini ce309f8885 cmDyndepCollation: Cxx module manifest format
Support the module manifest format added in !11422 as an output format
of dyndep collation for exports. This is necessary for CPS support of
modules, as CPS uses module manifests to describe C++20 modules.

Additionally, adds some CMake-vendor fields to the module manifest to
support compile-options and compile-features on module sources.
2026-01-22 00:59:43 -05:00
Vito Gamberini fa10dc6c22 Experimental/CXXModules: Implement EcoStd Module Metadata parser
Adds a parser and serializer for the EcoStd Module Metadata format

RFC: https://github.com/ecostd/rfcs/pull/3

This adapts the existing experimental support for import std; to use
the new parser. The CMAKE_CXX_STDLIB_MODULES_JSON is now the canonical
variable for controlling how CMake discovers the stdlib module metadata,
and is used directly by compiler detection.

Toolchains can still override the __CMAKE::CXX## targets if they wish,
either in conjunction with CMAKE_CXX_STDLIB_MODULE_JSON or not. It is
possible to disable automatic detection of
CMAKE_CXX_STDLIB_MODULE_JSON by setting it to the empty string.

When available, the CMAKE_CXX_STDLIB_MODULE_JSON will be used to create
all requested C++ stdlibs which do not already have targets.
2025-11-18 11:39:59 -05:00