Export: Virtualize file generation step helpers
Allow subclasses to override the actual content generation.
This commit is contained in:
parent
f81b9475f3
commit
d5257063b0
|
@ -78,26 +78,27 @@ protected:
|
||||||
std::vector<std::string>& missingTargets);
|
std::vector<std::string>& missingTargets);
|
||||||
|
|
||||||
// Methods to implement export file code generation.
|
// Methods to implement export file code generation.
|
||||||
void GeneratePolicyHeaderCode(std::ostream& os);
|
virtual void GeneratePolicyHeaderCode(std::ostream& os);
|
||||||
void GeneratePolicyFooterCode(std::ostream& os);
|
virtual void GeneratePolicyFooterCode(std::ostream& os);
|
||||||
void GenerateImportHeaderCode(std::ostream& os,
|
virtual void GenerateImportHeaderCode(std::ostream& os,
|
||||||
const std::string& config = "");
|
const std::string& config = "");
|
||||||
void GenerateImportFooterCode(std::ostream& os);
|
virtual void GenerateImportFooterCode(std::ostream& os);
|
||||||
void GenerateImportVersionCode(std::ostream& os);
|
void GenerateImportVersionCode(std::ostream& os);
|
||||||
void GenerateImportTargetCode(std::ostream& os,
|
virtual void GenerateImportTargetCode(std::ostream& os,
|
||||||
cmGeneratorTarget const* target);
|
cmGeneratorTarget const* target);
|
||||||
void GenerateImportPropertyCode(std::ostream& os, const std::string& config,
|
virtual void GenerateImportPropertyCode(std::ostream& os,
|
||||||
|
const std::string& config,
|
||||||
cmGeneratorTarget const* target,
|
cmGeneratorTarget const* target,
|
||||||
ImportPropertyMap const& properties);
|
ImportPropertyMap const& properties);
|
||||||
void GenerateImportedFileChecksCode(
|
virtual void GenerateImportedFileChecksCode(
|
||||||
std::ostream& os, cmGeneratorTarget* target,
|
std::ostream& os, cmGeneratorTarget* target,
|
||||||
ImportPropertyMap const& properties,
|
ImportPropertyMap const& properties,
|
||||||
const std::set<std::string>& importedLocations);
|
const std::set<std::string>& importedLocations);
|
||||||
void GenerateImportedFileCheckLoop(std::ostream& os);
|
virtual void GenerateImportedFileCheckLoop(std::ostream& os);
|
||||||
void GenerateMissingTargetsCheckCode(
|
virtual void GenerateMissingTargetsCheckCode(
|
||||||
std::ostream& os, const std::vector<std::string>& missingTargets);
|
std::ostream& os, const std::vector<std::string>& missingTargets);
|
||||||
|
|
||||||
void GenerateExpectedTargetsCode(std::ostream& os,
|
virtual void GenerateExpectedTargetsCode(std::ostream& os,
|
||||||
const std::string& expectedTargets);
|
const std::string& expectedTargets);
|
||||||
|
|
||||||
// Collect properties with detailed information about targets beyond
|
// Collect properties with detailed information about targets beyond
|
||||||
|
@ -142,8 +143,8 @@ protected:
|
||||||
ImportPropertyMap& properties);
|
ImportPropertyMap& properties);
|
||||||
void PopulateCompatibleInterfaceProperties(cmGeneratorTarget* target,
|
void PopulateCompatibleInterfaceProperties(cmGeneratorTarget* target,
|
||||||
ImportPropertyMap& properties);
|
ImportPropertyMap& properties);
|
||||||
void GenerateInterfaceProperties(cmGeneratorTarget const* target,
|
virtual void GenerateInterfaceProperties(
|
||||||
std::ostream& os,
|
cmGeneratorTarget const* target, std::ostream& os,
|
||||||
const ImportPropertyMap& properties);
|
const ImportPropertyMap& properties);
|
||||||
void PopulateIncludeDirectoriesInterface(
|
void PopulateIncludeDirectoriesInterface(
|
||||||
cmTargetExport* target,
|
cmTargetExport* target,
|
||||||
|
@ -171,7 +172,7 @@ protected:
|
||||||
std::vector<std::string>& missingTargets,
|
std::vector<std::string>& missingTargets,
|
||||||
FreeTargetsReplace replace = NoReplaceFreeTargets);
|
FreeTargetsReplace replace = NoReplaceFreeTargets);
|
||||||
|
|
||||||
void GenerateRequiredCMakeVersion(std::ostream& os,
|
virtual void GenerateRequiredCMakeVersion(std::ostream& os,
|
||||||
const char* versionString);
|
const char* versionString);
|
||||||
|
|
||||||
// The namespace in which the exports are placed in the generated file.
|
// The namespace in which the exports are placed in the generated file.
|
||||||
|
|
|
@ -81,16 +81,16 @@ protected:
|
||||||
const std::string& name);
|
const std::string& name);
|
||||||
|
|
||||||
/** Generate the relative import prefix. */
|
/** Generate the relative import prefix. */
|
||||||
void GenerateImportPrefix(std::ostream&);
|
virtual void GenerateImportPrefix(std::ostream&);
|
||||||
|
|
||||||
/** Generate the relative import prefix. */
|
/** Generate the relative import prefix. */
|
||||||
void LoadConfigFiles(std::ostream&);
|
virtual void LoadConfigFiles(std::ostream&);
|
||||||
|
|
||||||
void CleanupTemporaryVariables(std::ostream&);
|
virtual void CleanupTemporaryVariables(std::ostream&);
|
||||||
|
|
||||||
/** Generate a per-configuration file for the targets. */
|
/** Generate a per-configuration file for the targets. */
|
||||||
bool GenerateImportFileConfig(const std::string& config,
|
virtual bool GenerateImportFileConfig(
|
||||||
std::vector<std::string>& missingTargets);
|
const std::string& config, std::vector<std::string>& missingTargets);
|
||||||
|
|
||||||
/** Fill in properties indicating installed file locations. */
|
/** Fill in properties indicating installed file locations. */
|
||||||
void SetImportLocationProperty(const std::string& config,
|
void SetImportLocationProperty(const std::string& config,
|
||||||
|
|
Loading…
Reference in New Issue