1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

export: Factor out CMake-specific export generation (2/2)

In order to support generation of Common Package Specifications, the
mechanisms CMake uses to export package information need to be made more
abstract. The prior commits began this refactoring; this continues by
(actually) restructuring the classes used to generate the actual export files.
To minimize churn, this introduces virtual base classes and
diamond inheritance in order to separate logic which is format-agnostic
but depends on the export mode (build-tree versus install-tree) from
logic which is format-specific but mode-agnostic.

This could probably be refactored further to use helper classes instead,
and a future commit may do that, however an initial attempt to do that
was proving even more invasive, such that this approach was deemed more
manageable.

While we're at it, add 'const' in more places where possible.
This commit is contained in:
Matthew Woehlke
2024-07-18 12:07:26 -04:00
parent 6c66340a64
commit 20fa4ce8d8
30 changed files with 1106 additions and 4517 deletions

View File

@@ -345,8 +345,11 @@ CMAKE_CXX_SOURCES="\
cmExecuteProcessCommand \
cmExpandedCommandArgument \
cmExperimental \
cmExportBuildCMakeConfigGenerator \
cmExportBuildFileGenerator \
cmExportCMakeConfigGenerator \
cmExportFileGenerator \
cmExportInstallCMakeConfigGenerator \
cmExportInstallFileGenerator \
cmExportSet \
cmExportTryCompileFileGenerator \