diff options
Diffstat (limited to 'Source/cmExportFileGenerator.h')
-rw-r--r-- | Source/cmExportFileGenerator.h | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 70bc65d..5ad27bf 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -13,6 +13,7 @@ #define cmExportFileGenerator_h #include "cmCommand.h" +#include "cmGeneratorExpression.h" /** \class cmExportFileGenerator * \brief Generate a file exporting targets from a build or install tree. @@ -46,7 +47,8 @@ protected: // Generate per-configuration target information to the given output // stream. - void GenerateImportConfig(std::ostream& os, const char* config); + void GenerateImportConfig(std::ostream& os, const char* config, + std::vector<std::string> &missingTargets); // Methods to implement export file code generation. void GenerateImportHeaderCode(std::ostream& os, const char* config = 0); @@ -63,6 +65,8 @@ protected: void GenerateMissingTargetsCheckCode(std::ostream& os, const std::vector<std::string>& missingTargets); + void GenerateExpectedTargetsCode(std::ostream& os, + const std::string &expectedTargets); // Collect properties with detailed information about targets beyond // their location on disk. @@ -82,7 +86,8 @@ protected: /** Each subclass knows where the target files are located. */ virtual void GenerateImportTargetsConfig(std::ostream& os, const char* config, - std::string const& suffix) = 0; + std::string const& suffix, + std::vector<std::string> &missingTargets) = 0; /** Each subclass knows how to deal with a target that is missing from an * export set. */ @@ -91,6 +96,32 @@ protected: cmMakefile* mf, cmTarget* depender, cmTarget* dependee) = 0; + void PopulateInterfaceProperty(const char *, + cmTarget *target, + cmGeneratorExpression::PreprocessContext, + ImportPropertyMap &properties, + std::vector<std::string> &missingTargets); + void PopulateInterfaceProperty(const char *propName, cmTarget *target, + ImportPropertyMap &properties); + void PopulateCompatibleInterfaceProperties(cmTarget *target, + ImportPropertyMap &properties); + void GenerateInterfaceProperties(cmTarget *target, std::ostream& os, + const ImportPropertyMap &properties); + + void SetImportLinkInterface(const char* config, std::string const& suffix, + cmGeneratorExpression::PreprocessContext preprocessRule, + cmTarget* target, ImportPropertyMap& properties, + std::vector<std::string>& missingTargets); + + enum FreeTargetsReplace { + ReplaceFreeTargets, + NoReplaceFreeTargets + }; + + void ResolveTargetsInGeneratorExpressions(std::string &input, + cmTarget* target, const char *propName, + std::vector<std::string> &missingTargets, + FreeTargetsReplace replace = NoReplaceFreeTargets); // The namespace in which the exports are placed in the generated file. std::string Namespace; @@ -107,6 +138,22 @@ protected: // The set of targets included in the export. std::set<cmTarget*> ExportedTargets; + +private: + void PopulateInterfaceProperty(const char *, const char *, + cmTarget *target, + cmGeneratorExpression::PreprocessContext, + ImportPropertyMap &properties, + std::vector<std::string> &missingTargets); + + bool AddTargetNamespace(std::string &input, cmTarget* target, + std::vector<std::string> &missingTargets); + + void ResolveTargetsInGeneratorExpression(std::string &input, + cmTarget* target, const char *propName, + std::vector<std::string> &missingTargets); + + virtual void ReplaceInstallPrefix(std::string &input); }; #endif |