summaryrefslogtreecommitdiffstats
path: root/Source/cmCxxModuleMapper.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cxxmodules: return failure from the collator when private usage is foundBen Boeckel2024-02-151-1/+2
|
* cmCxxModuleMapper: Fix transitive requirements computationnamniav2023-12-051-5/+8
| | | | | | | | | | | | | | | | | | | | Previously CMake may generate incomplete transitive requirements in CMakeFiles/<target>.dir/CXXModules.json and therefore in module mapper for compiler, when source files were listed in CMakeList.txt in a certain order. This commit fixes the problem by correctly tracking unfinished transitive requirements computation of module units. There have been a simple circular test case whose circular dependency was reported by build system. Now with this correct implementation it's reported by CMake generating module mappers. Add two test cases for transitive requirements computation, one with adding source files in hardcoded order, and the other in randomized order. Fixes: #25465
* cmCxxModuleMapper: give transitive usages to Clang as wellBen Boeckel2023-07-131-8/+8
| | | | | | | | | | | In the future, Clang plans to require transitive module usage to be specified on the command line. This is in order to keep BMI files more reproducible. Handily, MSVC has already required this, so the logic can be reused for Clang easily. See: https://github.com/llvm/llvm-project/commit/e22fa1d4c6152d36cf1342ab9029adc97c79a310 See: https://github.com/llvm/llvm-project/issues/62707 See: https://discourse.llvm.org/t/c-20-modules-should-the-bmis-contain-paths-to-their-dependent-bmis/70422
* cmCxxModuleMapper: factor out transitive usage computationBen Boeckel2023-07-131-30/+57
| | | | Clang will need this in the future.
* cmCxxModuleMapper: use a `char` for streaming single bytesBen Boeckel2023-07-131-1/+1
|
* cmCxxModuleMapper: track whether modules are private or notBen Boeckel2023-05-181-23/+42
| | | | | | | | | | This allows collation to give a useful error message when it finds usage of a private module rather than collation just not informing the compilation and the compiler erroring out about not being able to import unknown modules (which exists, but it was not told about due to visibility). Fixes: #24652
* cmCxxModuleMapper: add a structure to represent BMI locationsBen Boeckel2023-05-181-0/+44
| | | | | | This structure allows representing whether a module is private in order to give a more useful error message when its usage is attempted from another target.
* cmCxxModuleMapper: Use value semantics in path conversion callbackBrad King2023-03-181-1/+1
| | | | | | The call site already owns a path it doesn't need when the callback returns. Hand ownership to the callback so it can optionally mutate the path without necessarily allocating.
* cmCxxModuleMapper: Remove redundant path conversion callbacksBrad King2023-03-181-4/+2
| | | | | Two calls to `PathForGenerator` were applied to values returned by `BmiGeneratorPathForModule`, that already calls `PathForGenerator`.
* cmCxxModuleMapper: Specify clang's BMI dependency with new formChuanqi Xu2023-02-171-1/+1
|
* cxxmodules: support new round of Clang patchesBen Boeckel2022-12-151-1/+1
| | | | | | | | | | These patches now support the `-MF` output, so remove the `none` support added just for the old patchset which did not use it. Also update the flag name to `-fmodule-output=`. Due to the new Clang module mapper flag, use a new experimental support UUID as well.
* cmCxxModuleMapper: support the `clang` module map formatBen Boeckel2022-12-021-0/+36
|
* cmCxxModuleMapper: support MSVC module map formatBen Boeckel2022-08-021-1/+82
| | | | | | THis is a set of flags stored in a response file which informs the compiler about where to place output BMI files as well as find the required BMIs.
* cmCxxModuleMapper: track transitive modules for MSVCBen Boeckel2022-08-021-0/+151
| | | | MSVC needs the transitive closure of module usage to compile.
* cmCxxModuleMapper: implement support for GCC's module map formatBen Boeckel2022-06-161-0/+46
|
* cmCxxModuleMapper: add source to handle module mapper contentsBen Boeckel2022-06-161-0/+30
This will allow all generators to share an implementation for actually writing out the module map formats.