Commit Graph

4 Commits

Author SHA1 Message Date
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
Ben Boeckel
3e7ffddf2f Tests/CXXModulesCompile: remove excess examples/ directory
Now that the test is split, it doesn't make sense to have the directory
anymore. It also helps with shortening paths.
2025-11-14 09:27:00 -05:00
Ben Boeckel
beabe25af1 Tests/CXXModulesCompile: rename examples to be shorter
Perform the following renames on the example directory names to avoid
long paths:

- `build-database` → `builddb`
- `export` → `exp`
- `import` → `imp`
- `include-directories` → `incdirs`
- `interface` → `iface`
- `module` → `mod`
- `private` → `priv`
- `property` → `prop`
- `properties` → `props`
- `transitive` → `trans`
2025-11-14 09:27:00 -05:00
Ben Boeckel
9a8700296c Tests/CXXModules: split out compilation tests
The test is getting fairly large and timing out more and more often.
Split out actual compilation tests.
2025-11-14 09:26:51 -05:00