diff options
author | Brad King <brad.king@kitware.com> | 2014-02-24 19:09:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-02-24 19:12:31 (GMT) |
commit | 718a9532c6bfa8c68864dd5dadba9f55e0f1bcf3 (patch) | |
tree | 0979aaa9b04e2db559be508e55229f66dfa5d572 /Source | |
parent | aae5184c169b037c027d4ede5ba42c37395ba7b4 (diff) | |
download | CMake-718a9532c6bfa8c68864dd5dadba9f55e0f1bcf3.zip CMake-718a9532c6bfa8c68864dd5dadba9f55e0f1bcf3.tar.gz CMake-718a9532c6bfa8c68864dd5dadba9f55e0f1bcf3.tar.bz2 |
cmTarget: Refactor ComputePDBOutputDir interface
Add a runtime parameter to specify the property name prefix.
Update the call site to pass "PDB" to preserve the existing
name for that call path.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 10 | ||||
-rw-r--r-- | Source/cmTarget.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index db34bd8..cf09269 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2467,7 +2467,7 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config) const OutputInfo info; this->ComputeOutputDir(config, false, info.OutDir); this->ComputeOutputDir(config, true, info.ImpDir); - if(!this->ComputePDBOutputDir(config, info.PdbDir)) + if(!this->ComputePDBOutputDir("PDB", config, info.PdbDir)) { info.PdbDir = info.OutDir; } @@ -4111,13 +4111,13 @@ bool cmTarget::ComputeOutputDir(const char* config, } //---------------------------------------------------------------------------- -bool cmTarget::ComputePDBOutputDir(const char* config, std::string& out) const +bool cmTarget::ComputePDBOutputDir(const char* kind, const char* config, + std::string& out) const { // Look for a target property defining the target output directory // based on the target type. - std::string targetTypeName = "PDB"; const char* propertyName = 0; - std::string propertyNameStr = targetTypeName; + std::string propertyNameStr = kind; if(!propertyNameStr.empty()) { propertyNameStr += "_OUTPUT_DIRECTORY"; @@ -4127,7 +4127,7 @@ bool cmTarget::ComputePDBOutputDir(const char* config, std::string& out) const // Check for a per-configuration output directory target property. std::string configUpper = cmSystemTools::UpperCase(config? config : ""); const char* configProp = 0; - std::string configPropStr = targetTypeName; + std::string configPropStr = kind; if(!configPropStr.empty()) { configPropStr += "_OUTPUT_DIRECTORY_"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 599e85d..7683253 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -710,7 +710,8 @@ private: OutputInfo const* GetOutputInfo(const char* config) const; bool ComputeOutputDir(const char* config, bool implib, std::string& out) const; - bool ComputePDBOutputDir(const char* config, std::string& out) const; + bool ComputePDBOutputDir(const char* kind, const char* config, + std::string& out) const; // Cache import information from properties for each configuration. struct ImportInfo; |