diff options
author | Brad King <brad.king@kitware.com> | 2015-10-20 15:16:45 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-20 15:16:45 (GMT) |
commit | 9afbb733ec2a55424e6c25c6afa7fdd14219d6b1 (patch) | |
tree | cf1f8a0124d239bb85b0c2f07afd19a6759a4520 /Source/cmGeneratorTarget.h | |
parent | 5ec8064b76aca89b6e0274e53c272f298655b992 (diff) | |
parent | d8f8940bc68f09e382320d1ffe36947ba880ae65 (diff) | |
download | CMake-9afbb733ec2a55424e6c25c6afa7fdd14219d6b1.zip CMake-9afbb733ec2a55424e6c25c6afa7fdd14219d6b1.tar.gz CMake-9afbb733ec2a55424e6c25c6afa7fdd14219d6b1.tar.bz2 |
Merge topic 'use-generator-target'
d8f8940b cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.
7550879f cmGeneratorTarget: Move IsXCTestOnApple from cmTarget.
88d10d55 cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget.
b5f5de70 cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.
8e20ea6e cmGeneratorTarget: Move IsLinkable from cmTarget.
a527abf0 Xcode: Port internal API to cmGeneratorTarget.
eb3be7d6 cmGeneratorTarget: Move GetExportName from cmTarget.
d231c31b Export: Port internal API to cmGeneratorTarget.
e6661282 Export: Port internal utility to cmGeneratorTarget.
2b9cc1e2 Export: Port some API to cmGlobalGenerator.
97062ac2 cmInstallTargetGenerator: Port GetInstallFilename to cmGeneratorTarget.
6a72b3c8 Export: Port interface to cmGeneratorTarget.
1293c156 cmExportTryCompileFileGenerator: Port to cmGeneratorTarget.
381e7afd cmExportSet: Store a cmGeneratorTarget.
65911cae cmGlobalGenerator: Compute export() related classes early.
37ab74a6 cmLocalGenerator: Port PList handling to cmGeneratorTarget.
...
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r-- | Source/cmGeneratorTarget.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 05a7d4d..6537421 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -43,6 +43,8 @@ public: cmState::TargetType GetType() const; std::string GetName() const; + std::string GetExportName() const; + const char *GetProperty(const std::string& prop) const; bool GetPropertyAsBool(const std::string& prop) const; void GetSourceFiles(std::vector<cmSourceFile*>& files, @@ -226,6 +228,12 @@ public: void GetLanguages(std::set<std::string>& languages, std::string const& config) const; + void + GetObjectLibrariesCMP0026(std::vector<cmGeneratorTarget*>& objlibs) const; + + std::string GetFullNameImported(const std::string& config, + bool implib) const; + bool GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const; bool HaveBuildTreeRPATH(const std::string& config) const; @@ -404,6 +412,22 @@ public: /** Get a build-tree directory in which to place target support files. */ std::string GetSupportDirectory() const; + /** Return whether this target may be used to link another target. */ + bool IsLinkable() const; + + /** Return whether this target is a shared library Framework on + Apple. */ + bool IsFrameworkOnApple() const; + + /** Return whether this target is an executable Bundle on Apple. */ + bool IsAppBundleOnApple() const; + + /** Return whether this target is a XCTest on Apple. */ + bool IsXCTestOnApple() const; + + /** Return whether this target is a CFBundle (plugin) on Apple. */ + bool IsCFBundleOnApple() const; + struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf) const; @@ -437,6 +461,19 @@ public: no soname at all. */ bool IsImportedSharedLibWithoutSOName(const std::string& config) const; + const char* ImportedGetLocation(const std::string& config) const; + + /** Get the target major and minor version numbers interpreted from + the VERSION property. Version 0 is returned if the property is + not set or cannot be parsed. */ + void GetTargetVersion(int& major, int& minor) const; + + /** Get the target major, minor, and patch version numbers + interpreted from the VERSION or SOVERSION property. Version 0 + is returned if the property is not set or cannot be parsed. */ + void + GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const; + private: friend class cmTargetTraceDependencies; struct SourceEntry { std::vector<cmSourceFile*> Depends; }; @@ -464,6 +501,13 @@ private: // Returns ARCHIVE, LIBRARY, or RUNTIME based on platform and type. const char* GetOutputTargetType(bool implib) const; + void ComputeVersionedName(std::string& vName, + std::string const& prefix, + std::string const& base, + std::string const& suffix, + std::string const& name, + const char* version) const; + struct CompatibleInterfacesBase { std::set<std::string> PropsBool; @@ -508,6 +552,31 @@ private: cmHeadToLinkInterfaceMap& GetHeadToLinkInterfaceUsageRequirementsMap( std::string const& config) const; + // Cache import information from properties for each configuration. + struct ImportInfo + { + ImportInfo(): NoSOName(false), Multiplicity(0) {} + bool NoSOName; + int Multiplicity; + std::string Location; + std::string SOName; + std::string ImportLibrary; + std::string Languages; + std::string Libraries; + std::string LibrariesProp; + std::string SharedDeps; + }; + + typedef std::map<std::string, ImportInfo> ImportInfoMapType; + mutable ImportInfoMapType ImportInfoMap; + void ComputeImportInfo(std::string const& desired_config, + ImportInfo& info) const; + ImportInfo const* GetImportInfo(const std::string& config) const; + + /** Strip off leading and trailing whitespace from an item named in + the link dependencies of this target. */ + std::string CheckCMP0004(std::string const& item) const; + cmLinkInterface const* GetImportLinkInterface(const std::string& config, const cmGeneratorTarget* head, |