Commit Graph

8 Commits

Author SHA1 Message Date
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
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
2025-01-23 13:09:50 -05:00
Brad King
52b31ff751 Merge topic 'multi-format-export'
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
2025-01-09 10:57:43 -05:00
Martin Duffy
c8997fc046 export: Allow depending on targets exported multiple times
Fixes: #26556
2025-01-07 15:27:14 -05:00
Martin Duffy
6195cefcfe export: Convert ExportInfo to a struct with meaningful field names 2024-12-30 10:59:33 -05:00
Matthew Woehlke
a2c7854e18 install: Update CPS export version
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.
2024-12-18 13:19:52 -05:00
Matthew Woehlke
f04dd93c47 cmExportPackageInfoGenerator: Fix version properties
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
2024-10-17 14:57:38 -04:00
Brad King
1650683c9d cmExportPackageInfoGenerator: Fix -Wdeprecated-redundant-constexpr-static-def
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.
2024-09-04 08:37:15 -04:00
Matthew Woehlke
3d52d70b84 export: Add initial CPS support
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.
2024-08-14 15:25:27 -04:00