Merge topic 'xcode-15-string-apis'

23dc6aa1 Xcode: Fix single-configuration generation for version 1.5
This commit is contained in:
Brad King 2014-06-06 09:44:55 -04:00 committed by CMake Topic Stage
commit c6e7c18bcc

View File

@ -2440,8 +2440,8 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
} }
else else
{ {
const char* theConfig = std::string theConfig =
this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE"); this->CurrentMakefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
cmXCodeObject* buildSettings = cmXCodeObject* buildSettings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
this->CreateBuildSettings(cmtarget, buildSettings, theConfig); this->CreateBuildSettings(cmtarget, buildSettings, theConfig);
@ -2819,11 +2819,7 @@ void cmGlobalXCodeGenerator
i != this->CurrentConfigurationTypes.end(); ++i) i != this->CurrentConfigurationTypes.end(); ++i)
{ {
// Get the current configuration name. // Get the current configuration name.
const char* configName = i->c_str(); std::string configName = *i;
if(!*configName)
{
configName = 0;
}
if(this->XcodeVersion >= 50) if(this->XcodeVersion >= 50)
{ {
@ -3510,11 +3506,7 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
ct = this->CurrentConfigurationTypes.begin(); ct = this->CurrentConfigurationTypes.begin();
ct != this->CurrentConfigurationTypes.end(); ++ct) ct != this->CurrentConfigurationTypes.end(); ++ct)
{ {
const char* configName = 0; std::string configName = *ct;
if(!ct->empty())
{
configName = ct->c_str();
}
for(std::vector<cmXCodeObject*>::iterator i = targets.begin(); for(std::vector<cmXCodeObject*>::iterator i = targets.begin();
i != targets.end(); ++i) i != targets.end(); ++i)
{ {
@ -3967,7 +3959,7 @@ bool cmGlobalXCodeGenerator::IsMultiConfig()
void cmGlobalXCodeGenerator void cmGlobalXCodeGenerator
::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const ::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
{ {
const char* configName = this->GetCMakeCFGIntDir(); std::string configName = this->GetCMakeCFGIntDir();
std::string dir = this->GetObjectsNormalDirectory( std::string dir = this->GetObjectsNormalDirectory(
"$(PROJECT_NAME)", configName, gt->Target); "$(PROJECT_NAME)", configName, gt->Target);
if(this->XcodeVersion >= 21) if(this->XcodeVersion >= 21)