diff options
author | Brad King <brad.king@kitware.com> | 2009-07-03 14:33:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-03 14:33:59 (GMT) |
commit | 275c21d3518a80aefa493131052c20e83676bc4a (patch) | |
tree | a921e3d7f5c874356cc51862eccd32dfd6ff98ea /Source/cmTarget.h | |
parent | 43669f0ef279a88816e8b9053beed6e9ee772ab5 (diff) | |
download | CMake-275c21d3518a80aefa493131052c20e83676bc4a.zip CMake-275c21d3518a80aefa493131052c20e83676bc4a.tar.gz CMake-275c21d3518a80aefa493131052c20e83676bc4a.tar.bz2 |
ENH: Refactor target output dir computation
This creates cmTarget::GetOutputInfo to compute, cache, and lookup
target output directory information on a per-configuration basis. It
avoids re-computing the information every time it is needed.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 6d6ce66..12b8bb4 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -462,10 +462,6 @@ private: // Returns ARCHIVE, LIBRARY, or RUNTIME based on platform and type. const char* GetOutputTargetType(bool implib); - // Get the full path to the target output directory. - std::string GetOutputDir(bool implib); - std::string const& ComputeBaseOutputDir(bool implib); - // Get the target base name. std::string GetOutputName(const char* config, bool implib); @@ -500,8 +496,6 @@ private: bool HaveInstallRule; std::string InstallPath; std::string RuntimeInstallPath; - std::string BaseOutputDir; - std::string BaseOutputDirImplib; std::string Location; std::string ExportMacro; std::set<cmStdString> Utilities; @@ -511,6 +505,17 @@ private: bool DLLPlatform; bool IsImportedTarget; + // Cache target output paths for each configuration. + struct OutputInfo + { + std::string OutDir; + std::string ImpDir; + }; + typedef std::map<cmStdString, OutputInfo> OutputInfoMapType; + OutputInfoMapType OutputInfoMap; + OutputInfo const* GetOutputInfo(const char* config); + void ComputeOutputDir(const char* config, bool implib, std::string& out); + // Cache import information from properties for each configuration. struct ImportInfo { |