summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-24 19:09:05 (GMT)
committerBrad King <brad.king@kitware.com>2014-02-24 19:12:31 (GMT)
commit718a9532c6bfa8c68864dd5dadba9f55e0f1bcf3 (patch)
tree0979aaa9b04e2db559be508e55229f66dfa5d572 /Source/cmTarget.cxx
parentaae5184c169b037c027d4ede5ba42c37395ba7b4 (diff)
downloadCMake-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/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx10
1 files changed, 5 insertions, 5 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_";