summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallExportGenerator.h
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2024-07-18 16:07:26 (GMT)
committerMatthew Woehlke <matthew.woehlke@kitware.com>2024-07-23 16:13:39 (GMT)
commit20fa4ce8d89369441dc4f8a74d62611e8dfa36ea (patch)
tree6c23718e1cb92ad7003f2157dd233bbc7333c5e6 /Source/cmInstallExportGenerator.h
parent6c66340a647fc7fa59e3f63e9344c05d3e760bfb (diff)
downloadCMake-20fa4ce8d89369441dc4f8a74d62611e8dfa36ea.zip
CMake-20fa4ce8d89369441dc4f8a74d62611e8dfa36ea.tar.gz
CMake-20fa4ce8d89369441dc4f8a74d62611e8dfa36ea.tar.bz2
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.
Diffstat (limited to 'Source/cmInstallExportGenerator.h')
-rw-r--r--Source/cmInstallExportGenerator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h
index b2a74ac..6100610 100644
--- a/Source/cmInstallExportGenerator.h
+++ b/Source/cmInstallExportGenerator.h
@@ -36,6 +36,8 @@ public:
cmInstallExportGenerator& operator=(const cmInstallExportGenerator&) =
delete;
+ virtual char const* InstallSubcommand() const = 0;
+
cmExportSet* GetExportSet() { return this->ExportSet; }
bool Compute(cmLocalGenerator* lg) override;
@@ -56,8 +58,6 @@ public:
}
protected:
- virtual char const* InstallSubcommand() const = 0;
-
void GenerateScript(std::ostream& os) override;
void GenerateScriptConfigs(std::ostream& os, Indent indent) override;
void GenerateScriptActions(std::ostream& os, Indent indent) override;