summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-06 13:44:55 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-06-06 13:44:55 (GMT)
commitc6e7c18bcc2943962074f101e2a44229f3699022 (patch)
tree8723064ca120a4af086f4e6aed0cec43375f222b /Source/cmGlobalXCodeGenerator.cxx
parent09c5fdfaa3c758e3607381246c07278fb3fa8327 (diff)
parent23dc6aa1949180925444c32534ac3f6f6e2c3351 (diff)
downloadCMake-c6e7c18bcc2943962074f101e2a44229f3699022.zip
CMake-c6e7c18bcc2943962074f101e2a44229f3699022.tar.gz
CMake-c6e7c18bcc2943962074f101e2a44229f3699022.tar.bz2
Merge topic 'xcode-15-string-apis'
23dc6aa1 Xcode: Fix single-configuration generation for version 1.5
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 87ccfbd..29a5955 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2440,8 +2440,8 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
}
else
{
- const char* theConfig =
- this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE");
+ std::string theConfig =
+ this->CurrentMakefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
cmXCodeObject* buildSettings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
this->CreateBuildSettings(cmtarget, buildSettings, theConfig);
@@ -2819,11 +2819,7 @@ void cmGlobalXCodeGenerator
i != this->CurrentConfigurationTypes.end(); ++i)
{
// Get the current configuration name.
- const char* configName = i->c_str();
- if(!*configName)
- {
- configName = 0;
- }
+ std::string configName = *i;
if(this->XcodeVersion >= 50)
{
@@ -3510,11 +3506,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
ct = this->CurrentConfigurationTypes.begin();
ct != this->CurrentConfigurationTypes.end(); ++ct)
{
- const char* configName = 0;
- if(!ct->empty())
- {
- configName = ct->c_str();
- }
+ std::string configName = *ct;
for(std::vector<cmXCodeObject*>::iterator i = targets.begin();
i != targets.end(); ++i)
{
@@ -3967,7 +3959,7 @@ bool cmGlobalXCodeGenerator::IsMultiConfig()
void cmGlobalXCodeGenerator
::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
{
- const char* configName = this->GetCMakeCFGIntDir();
+ std::string configName = this->GetCMakeCFGIntDir();
std::string dir = this->GetObjectsNormalDirectory(
"$(PROJECT_NAME)", configName, gt->Target);
if(this->XcodeVersion >= 21)