diff options
author | Brad King <brad.king@kitware.com> | 2008-01-30 22:25:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-30 22:25:52 (GMT) |
commit | 7902bc06aae07a9d4cde81ab41c3c86694d80a9b (patch) | |
tree | 20810436488a804ffadb37c349d8db594d368a36 /Source/cmTarget.h | |
parent | 22be36f8d52fae0f509725253f175b0c1ec65dcc (diff) | |
download | CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.zip CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.tar.gz CMake-7902bc06aae07a9d4cde81ab41c3c86694d80a9b.tar.bz2 |
ENH: Implemented link-interface specification feature.
- Shared libs and executables with exports may now have
explicit transitive link dependencies specified
- Created LINK_INTERFACE_LIBRARIES and related properties
- Exported targets get the interface libraries as their
IMPORTED_LINK_LIBRARIES property.
- The export() and install(EXPORT) commands now give
an error when a linked target is not included since
the user can change the interface libraries instead
of adding the target.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 37ab203..bbcdafc 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -35,6 +35,20 @@ struct cmTargetLinkInformationMap: ~cmTargetLinkInformationMap(); }; +struct cmTargetLinkInterface: public std::vector<std::string> +{ + typedef std::vector<std::string> derived; +}; + +struct cmTargetLinkInterfaceMap: + public std::map<cmStdString, cmTargetLinkInterface*> +{ + typedef std::map<cmStdString, cmTargetLinkInterface*> derived; + cmTargetLinkInterfaceMap() {} + cmTargetLinkInterfaceMap(cmTargetLinkInterfaceMap const& r); + ~cmTargetLinkInterfaceMap(); +}; + /** \class cmTarget * \brief Represent a library or executable target loaded from a makefile. * @@ -209,6 +223,12 @@ public: std::vector<std::string> const* GetImportedLinkLibraries(const char* config); + /** Get the library interface dependencies. This is the set of + libraries from which something that links to this target may + also receive symbols. Returns 0 if the user has not specified + such dependencies or for static libraries. */ + cmTargetLinkInterface const* GetLinkInterface(const char* config); + /** Get the directory in which this target will be built. If the configuration name is given then the generator will add its subdirectory for that configuration. Otherwise just the canonical @@ -476,6 +496,10 @@ private: cmTargetLinkInformationMap LinkInformation; + // Link interface. + cmTargetLinkInterface* ComputeLinkInterface(const char* config); + cmTargetLinkInterfaceMap LinkInterface; + // The cmMakefile instance that owns this target. This should // always be set. cmMakefile* Makefile; |