diff options
author | Brad King <brad.king@kitware.com> | 2008-01-29 20:07:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-29 20:07:33 (GMT) |
commit | ffac622a858cca4dc661caa896d961da666430cc (patch) | |
tree | 3c52af43de45021dbfc5afc7f64f3ce17701a78f /Source/cmTarget.h | |
parent | bb52f45ebb6b1c80f8f7b8e2b841202118ed9d06 (diff) | |
download | CMake-ffac622a858cca4dc661caa896d961da666430cc.zip CMake-ffac622a858cca4dc661caa896d961da666430cc.tar.gz CMake-ffac622a858cca4dc661caa896d961da666430cc.tar.bz2 |
ENH: Add cmTarget::GetLinkInformation method to allow several places in the generators to share link information while only computing it once per configuration for a target. Use it to simplify the chrpath feature.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index c1de1a3..202190a 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -24,6 +24,7 @@ class cmake; class cmMakefile; class cmSourceFile; class cmGlobalGenerator; +class cmComputeLinkInformation; /** \class cmTarget * \brief Represent a library or executable target loaded from a makefile. @@ -35,6 +36,7 @@ class cmTarget { public: cmTarget(); + ~cmTarget(); enum TargetType { EXECUTABLE, STATIC_LIBRARY, SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET, INSTALL_FILES, INSTALL_PROGRAMS, INSTALL_DIRECTORY}; @@ -289,13 +291,15 @@ public: bool HaveBuildTreeRPATH(); bool HaveInstallTreeRPATH(); - - /// return true if chrpath might work for this target - bool IsChrpathAvailable(); + + /** Return true if chrpath might work for this target */ + bool IsChrpathUsed(); std::string GetInstallNameDirForBuildTree(const char* config); std::string GetInstallNameDirForInstallTree(const char* config); + cmComputeLinkInformation* GetLinkInformation(const char* config); + // Get the properties cmPropertyMap &GetProperties() { return this->Properties; }; @@ -462,6 +466,8 @@ private: ImportInfo const* GetImportInfo(const char* config); void ComputeImportInfo(std::string const& desired_config, ImportInfo& info); + std::map<cmStdString, cmComputeLinkInformation*> LinkInformation; + // The cmMakefile instance that owns this target. This should // always be set. cmMakefile* Makefile; |