summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-03 12:41:10 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-03 12:41:10 (GMT)
commit11d1063452178b00ac66304da337c1cb56dfa469 (patch)
treeea97e52e9bba286f733b26455ca2b457c678931b /Source/cmMakefileTargetGenerator.cxx
parent789eaf157c1587e4eff9c2627c50e537fc56ba71 (diff)
downloadCMake-11d1063452178b00ac66304da337c1cb56dfa469.zip
CMake-11d1063452178b00ac66304da337c1cb56dfa469.tar.gz
CMake-11d1063452178b00ac66304da337c1cb56dfa469.tar.bz2
ENH: Create cmMakefileTargetGenerator::ConfigName
This member stores the build configuration for which Makefiles are being generated. It saves repeated lookup of the equivalent member from cmLocalUnixMakefileGenerator3, making code shorter and more readable.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index f38874d..81fa4a1 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -43,6 +43,7 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
this->LocalGenerator =
static_cast<cmLocalUnixMakefileGenerator3*>(
this->Makefile->GetLocalGenerator());
+ this->ConfigName = this->LocalGenerator->ConfigurationName.c_str();
this->GlobalGenerator =
static_cast<cmGlobalUnixMakefileGenerator3*>(
this->LocalGenerator->GetGlobalGenerator());
@@ -602,7 +603,6 @@ cmMakefileTargetGenerator
std::string targetOutPathPDB;
{
std::string targetFullPathPDB;
- const char* configName = this->LocalGenerator->ConfigurationName.c_str();
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
@@ -610,7 +610,7 @@ cmMakefileTargetGenerator
{
targetFullPathPDB = this->Target->GetDirectory();
targetFullPathPDB += "/";
- targetFullPathPDB += this->Target->GetPDBName(configName);
+ targetFullPathPDB += this->Target->GetPDBName(this->ConfigName);
}
targetOutPathPDB =
this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL,