diff options
author | Eugene Shalygin <eugene.shalygin@gmail.com> | 2021-07-20 19:41:36 (GMT) |
---|---|---|
committer | Eugene Shalygin <eugene.shalygin@gmail.com> | 2021-07-22 11:08:58 (GMT) |
commit | e8e19ed8f2f0d05bb7fc7e5987809a3754ad4f74 (patch) | |
tree | e5bd13d1906dab2f18718ad54ba8eceb666b637d /Source/cmExportFileGenerator.h | |
parent | 55e4753bbb60c0da12b09837bac97a46b851ae32 (diff) | |
download | CMake-e8e19ed8f2f0d05bb7fc7e5987809a3754ad4f74.zip CMake-e8e19ed8f2f0d05bb7fc7e5987809a3754ad4f74.tar.gz CMake-e8e19ed8f2f0d05bb7fc7e5987809a3754ad4f74.tar.bz2 |
Refactor export file generator inteface
Replace cmTargetExport with const cmGeneratorTarget to allow recursive
processing of exported targets and their link dependencies.
Diffstat (limited to 'Source/cmExportFileGenerator.h')
-rw-r--r-- | Source/cmExportFileGenerator.h | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 45eaed0..24e048b 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -27,8 +27,6 @@ class cmGeneratorTarget; CMake_VERSION_MINOR) "." STRINGIFY(CMake_VERSION_PATCH) \ : #major "." #minor ".0") -class cmTargetExport; - /** \class cmExportFileGenerator * \brief Generate a file exporting targets from a build or install tree. * @@ -108,7 +106,7 @@ protected: }; template <typename T> void SetImportLinkProperty(std::string const& suffix, - cmGeneratorTarget* target, + cmGeneratorTarget const* target, const std::string& propName, std::vector<T> const& entries, ImportPropertyMap& properties, @@ -127,44 +125,45 @@ protected: * export set. */ virtual void HandleMissingTarget(std::string& link_libs, std::vector<std::string>& missingTargets, - cmGeneratorTarget* depender, + cmGeneratorTarget const* depender, cmGeneratorTarget* dependee) = 0; - void PopulateInterfaceProperty(const std::string&, cmGeneratorTarget* target, + void PopulateInterfaceProperty(const std::string&, + cmGeneratorTarget const* target, cmGeneratorExpression::PreprocessContext, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); bool PopulateInterfaceLinkLibrariesProperty( - cmGeneratorTarget* target, cmGeneratorExpression::PreprocessContext, + cmGeneratorTarget const* target, cmGeneratorExpression::PreprocessContext, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); void PopulateInterfaceProperty(const std::string& propName, - cmGeneratorTarget* target, + cmGeneratorTarget const* target, ImportPropertyMap& properties); - void PopulateCompatibleInterfaceProperties(cmGeneratorTarget* target, + void PopulateCompatibleInterfaceProperties(cmGeneratorTarget const* target, ImportPropertyMap& properties); virtual void GenerateInterfaceProperties( cmGeneratorTarget const* target, std::ostream& os, const ImportPropertyMap& properties); void PopulateIncludeDirectoriesInterface( - cmTargetExport* target, + cmGeneratorTarget const* target, cmGeneratorExpression::PreprocessContext preprocessRule, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); void PopulateSourcesInterface( - cmTargetExport* target, + cmGeneratorTarget const* target, cmGeneratorExpression::PreprocessContext preprocessRule, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); void PopulateLinkDirectoriesInterface( - cmTargetExport* target, + cmGeneratorTarget const* target, cmGeneratorExpression::PreprocessContext preprocessRule, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); void PopulateLinkDependsInterface( - cmTargetExport* target, + cmGeneratorTarget const* target, cmGeneratorExpression::PreprocessContext preprocessRule, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); void SetImportLinkInterface( const std::string& config, std::string const& suffix, cmGeneratorExpression::PreprocessContext preprocessRule, - cmGeneratorTarget* target, ImportPropertyMap& properties, + cmGeneratorTarget const* target, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); enum FreeTargetsReplace @@ -174,14 +173,14 @@ protected: }; void ResolveTargetsInGeneratorExpressions( - std::string& input, cmGeneratorTarget* target, + std::string& input, cmGeneratorTarget const* target, std::vector<std::string>& missingTargets, FreeTargetsReplace replace = NoReplaceFreeTargets); virtual void GenerateRequiredCMakeVersion(std::ostream& os, const char* versionString); - bool PopulateExportProperties(cmGeneratorTarget* gte, + bool PopulateExportProperties(cmGeneratorTarget const* gte, ImportPropertyMap& properties, std::string& errorMessage); @@ -205,20 +204,20 @@ protected: private: void PopulateInterfaceProperty(const std::string&, const std::string&, - cmGeneratorTarget* target, + cmGeneratorTarget const* target, cmGeneratorExpression::PreprocessContext, ImportPropertyMap& properties, std::vector<std::string>& missingTargets); - bool AddTargetNamespace(std::string& input, cmGeneratorTarget* target, + bool AddTargetNamespace(std::string& input, cmGeneratorTarget const* target, std::vector<std::string>& missingTargets); void ResolveTargetsInGeneratorExpression( - std::string& input, cmGeneratorTarget* target, + std::string& input, cmGeneratorTarget const* target, std::vector<std::string>& missingTargets); virtual void ReplaceInstallPrefix(std::string& input); - virtual std::string InstallNameDir(cmGeneratorTarget* target, + virtual std::string InstallNameDir(cmGeneratorTarget const* target, const std::string& config) = 0; }; |