diff options
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 60 |
1 files changed, 46 insertions, 14 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index e442d25..d4069fa 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -15,6 +15,7 @@ #include "cmCustomCommand.h" #include "cmPropertyMap.h" #include "cmPolicies.h" +#include "cmMakefileIncludeDirectoriesEntry.h" #include <cmsys/auto_ptr.hxx> @@ -22,7 +23,19 @@ class cmake; class cmMakefile; class cmSourceFile; class cmGlobalGenerator; +class cmComputeLinkInformation; class cmListFileBacktrace; +class cmTarget; + +struct cmTargetLinkInformationMap: + public std::map<std::pair<cmTarget*, std::string>, cmComputeLinkInformation*> +{ + typedef std::map<std::pair<cmTarget*, std::string>, + cmComputeLinkInformation*> derived; + cmTargetLinkInformationMap() {} + cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r); + ~cmTargetLinkInformationMap(); +}; class cmTargetInternals; class cmTargetInternalPointer @@ -99,9 +112,6 @@ public: std::vector<cmCustomCommand> &GetPostBuildCommands() {return this->PostBuildCommands;} - ///! Return the list of frameworks being linked to this target - std::vector<std::string> &GetFrameworks() {return this->Frameworks;} - /** * Get the list of the source files used by this target */ @@ -158,6 +168,9 @@ public: return this->LinkLibraries;} const LinkLibraryVectorType &GetOriginalLinkLibraries() const {return this->OriginalLinkLibraries;} + void GetDirectLinkLibraries(const char *config, + std::vector<std::string> &, + cmTarget *head); /** Compute the link type to use for the given configuration. */ LinkLibraryType ComputeLinkType(const char* config); @@ -169,7 +182,6 @@ public: // Check to see if a library is a framework and treat it different on Mac bool NameResolvesToFramework(const std::string& libname); - bool AddFramework(const std::string& lib, LinkLibraryType llt); void AddLinkLibrary(cmMakefile& mf, const char *target, const char* lib, LinkLibraryType llt); @@ -251,7 +263,8 @@ public: /** Get the link interface for the given configuration. Returns 0 if the target cannot be linked. */ - LinkInterface const* GetLinkInterface(const char* config); + LinkInterface const* GetLinkInterface(const char* config, + cmTarget *headTarget); /** The link implementation specifies the direct library dependencies needed by the object files of the target. */ @@ -267,7 +280,8 @@ public: // Needed only for OLD behavior of CMP0003. std::vector<std::string> WrongConfigLibraries; }; - LinkImplementation const* GetLinkImplementation(const char* config); + LinkImplementation const* GetLinkImplementation(const char* config, + cmTarget *head); /** Link information from the transitive closure of the link implementation and the interfaces of its dependencies. */ @@ -279,7 +293,7 @@ public: // Languages whose runtime libraries must be linked. std::vector<std::string> Languages; }; - LinkClosure const* GetLinkClosure(const char* config); + LinkClosure const* GetLinkClosure(const char* config, cmTarget *head); /** Strip off leading and trailing whitespace from an item named in the link dependencies of this target. */ @@ -324,7 +338,7 @@ public: bool FindSourceFiles(); ///! Return the preferred linker language for this target - const char* GetLinkerLanguage(const char* config = 0); + const char* GetLinkerLanguage(const char* config = 0, cmTarget *head = 0); /** Get the full name of the target according to the settings in its makefile. */ @@ -392,9 +406,17 @@ public: std::string GetInstallNameDirForInstallTree(const char* config, bool for_xcode = false); + cmComputeLinkInformation* GetLinkInformation(const char* config, + cmTarget *head = 0); + // Get the properties cmPropertyMap &GetProperties() { return this->Properties; }; + bool GetMappedConfig(std::string const& desired_config, + const char** loc, + const char** imp, + std::string& suffix); + // Define the properties static void DefineProperties(cmake *cm); @@ -462,6 +484,9 @@ public: /** @return the Mac framework directory without the base. */ std::string GetFrameworkDirectory(const char* config = 0); + std::vector<std::string> GetIncludeDirectories(const char *config); + void InsertInclude(const cmMakefileIncludeDirectoriesEntry &entry, + bool before = false); private: /** * A list of direct dependencies. Use in conjunction with DependencyMap. @@ -557,7 +582,6 @@ private: LinkLibraryVectorType LinkLibraries; LinkLibraryVectorType PrevLinkedLibraries; bool LinkLibrariesAnalyzed; - std::vector<std::string> Frameworks; std::vector<std::string> LinkDirectories; std::set<cmStdString> LinkDirectoriesEmmitted; bool HaveInstallRule; @@ -581,14 +605,19 @@ private: // Cache import information from properties for each configuration. struct ImportInfo; - ImportInfo const* GetImportInfo(const char* config); - void ComputeImportInfo(std::string const& desired_config, ImportInfo& info); + ImportInfo const* GetImportInfo(const char* config, + cmTarget *workingTarget); + void ComputeImportInfo(std::string const& desired_config, ImportInfo& info, + cmTarget *head); - bool ComputeLinkInterface(const char* config, LinkInterface& iface); + cmTargetLinkInformationMap LinkInformation; + + bool ComputeLinkInterface(const char* config, LinkInterface& iface, + cmTarget *head); void ComputeLinkImplementation(const char* config, - LinkImplementation& impl); - void ComputeLinkClosure(const char* config, LinkClosure& lc); + LinkImplementation& impl, cmTarget *head); + void ComputeLinkClosure(const char* config, LinkClosure& lc, cmTarget *head); void ClearLinkMaps(); @@ -596,6 +625,9 @@ private: void ProcessSourceExpression(std::string const& expr); + std::string GetDebugGeneratorExpressions(const std::string &value, + cmTarget::LinkLibraryType llt); + // The cmMakefile instance that owns this target. This should // always be set. cmMakefile* Makefile; |