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
c8997fc046 export: Allow depending on targets exported multiple times
7b553a3b1d cmExportInstallFileGenerator: Report errors with IssueMessage
6195cefcfe export: Convert ExportInfo to a struct with meaningful field names
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10114
Bump the version of CPS we claim to generate from 0.12.0 to 0.13.0,
which is the version we require for import.
The change between 0.12 and 0.13 is the addition of the `prefix`
attribute, and that one of `cps_path` or `prefix` is required. Since our
current implementation always supplies `cps_path`, no other changes are
needed to conform to the new schema version.
Fix a small bug in cmExportPackageInfoGenerator that caused extended
version properties ("compat_version", "version_schema")) to be emitted
when empty. Add a test to ensure this is working as intended.
Fixes: #26264
In commit 3d52d70b84 (export: Add initial CPS support, 2024-07-26) we
added a static definition of a `constexpr` member to help older
AppleClang and SunPro linkers. This is deprecated by C++17 and Clang
now warns about it, so preserving the approach would require complex
conditions. There is no significant benefit to `constexpr` here, so use
a traditional file-scoped definition instead.
Add initial support for exporting (install only, for now) Common Package
Specification (https://cps-org.github.io/cps/) format package
descriptions. This has some limitations, such as not supporting
generator expressions (as these cannot be portably exported), and only
partially supporting transitive dependencies, but should be usable for
at least some simple cases. (Actually, $<LINK_ONLY> is theoretically
supportable, but is not yet implemented.)
This still needs tests; these will be added in the next commit. Other
potential improvements include support for language-specific compile
definitions and inferring some package properties from project
properties. Additionally, there is no module support yet; this is partly
pending on having a tool agnostic format for providing the necessary
information.