summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-03-08 20:33:19 (GMT)
committerBrad King <brad.king@kitware.com>2007-03-08 20:33:19 (GMT)
commit01dc699d82af9bca7d9f4c1bdc9e453e764861ba (patch)
tree5a74141a229e9737198b5e774ebb0c3f45942c2d /Source/cmTarget.cxx
parent789a0f83594cd3bafcc9a3051a5ed53ec76c8684 (diff)
downloadCMake-01dc699d82af9bca7d9f4c1bdc9e453e764861ba.zip
CMake-01dc699d82af9bca7d9f4c1bdc9e453e764861ba.tar.gz
CMake-01dc699d82af9bca7d9f4c1bdc9e453e764861ba.tar.bz2
ENH: Combined cmTarget::GetDirectory and cmTarget::GetOutputDir since they are nearly the same. This is another step for bug#2240.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3cffff6..f3e59e5 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1093,14 +1093,18 @@ void cmTarget::SetProperty(const char* prop, const char* value)
const char* cmTarget::GetDirectory(const char* config)
{
- this->Directory = this->GetOutputDir();
if(config)
{
+ this->Directory = this->GetOutputDir();
// Add the configuration's subdirectory.
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
AppendDirectoryForConfig("/", config, "", this->Directory);
+ return this->Directory.c_str();
+ }
+ else
+ {
+ return this->GetOutputDir();
}
- return this->Directory.c_str();
}
const char* cmTarget::GetLocation(const char* config)