Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Issue: #26123
In commit 9c0491a3e4 (cmDyndepCollation: write out scanned source
information too, 2024-03-25) via !9708, the `sf_map` gained a new job of
also being used to track non-file set sources which could import
modules. This was implemented by removing processed `FILE_SET TYPE
CXX_MODULES` sources from the map and working with the sources
remaining. When a `FILE_SET TYPE CXX_MODULES` source appeared multiple
times, this would then erroneously complain that it "was not scheduled
for compilation". Use a set of source paths to track sources that have
already been processed. If duplicates are found, trigger an author
warning and skip the duplicate file.
Fixes: #26549
Previously, only `export()` calls in the same directory were noticed.
Also add a test that exports in a different directory than the target
itself resides in.
Fixes: #25813
142a85f9c1 cxxmodules: use filesystem-safe export names in filenames
4452d41488 cmGeneratorTarget: add method to get a filesystem-safe export name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9474
`cmSourceFile::GetFullPath()` performs a `CollapseFullPath` before
storing the path. Match this behavior when looking up paths from the
source file set constructions.
Fixes: #25614
Previously an internal error was raised which ended up causing an
internal exception to be thrown. This is a typo situation that should
fall into an explicit error.
Fixes: #25207
When generating the `IMPORTED_CXX_MODULES_[CONFIG]` target property,
there was a missing path separator after a non-empty relative directory
part of the path to a module source file.
Co-authored-by: Brad King <brad.king@kitware.com>
These were left from an older design iteration in which, for MSVC, we
needed to distinguish `cl -internalPartition` from `cl -interface`
before scanning. It is no longer needed since `cl -scanDependencies`
was updated to use the standard-conforming interpretation of
non-exported module partition syntax.
Issue: #24611
To facilitate other generators being able to build C++20 modules, start
pulling out collator logic into a generator-agnostic location.
This commit starts by factoring out the information written to the
"target depend info" object consumed during the build to handle writing
out export and installation scripts expected during those steps.