summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-01-03 10:58:52 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2016-01-03 17:31:33 (GMT)
commitdc0ddb9e34f885d32f0fa3bb25072ec77e4a79bb (patch)
tree2616a6d7c4e1f264b6a708a1140f72687d435152 /Source/cmGlobalXCodeGenerator.cxx
parent28f98ceef1770fe252c0c3c1e59aca773cc64009 (diff)
downloadCMake-dc0ddb9e34f885d32f0fa3bb25072ec77e4a79bb.zip
CMake-dc0ddb9e34f885d32f0fa3bb25072ec77e4a79bb.tar.gz
CMake-dc0ddb9e34f885d32f0fa3bb25072ec77e4a79bb.tar.bz2
Xcode: Store configuration name along with XcodeObject (#14947)
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 6f192cb..3ac1137 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3440,18 +3440,19 @@ bool cmGlobalXCodeGenerator
this->CreateObject(cmXCodeObject::XCConfigurationList);
cmXCodeObject* buildConfigurations =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
- std::vector<cmXCodeObject*> configs;
+ typedef std::vector<std::pair<std::string, cmXCodeObject*> > Configs;
+ Configs configs;
const char *defaultConfigName = "Debug";
if(this->XcodeVersion == 15)
{
cmXCodeObject* configDebug =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
configDebug->AddAttribute("name", this->CreateString("Debug"));
- configs.push_back(configDebug);
+ configs.push_back(std::make_pair("Debug", configDebug));
cmXCodeObject* configRelease =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
configRelease->AddAttribute("name", this->CreateString("Release"));
- configs.push_back(configRelease);
+ configs.push_back(std::make_pair("Release", configRelease));
}
else
{
@@ -3465,13 +3466,12 @@ bool cmGlobalXCodeGenerator
cmXCodeObject* config =
this->CreateObject(cmXCodeObject::XCBuildConfiguration);
config->AddAttribute("name", this->CreateString(name));
- configs.push_back(config);
+ configs.push_back(std::make_pair(name, config));
}
}
- for(std::vector<cmXCodeObject*>::iterator c = configs.begin();
- c != configs.end(); ++c)
+ for(Configs::iterator c = configs.begin(); c != configs.end(); ++c)
{
- buildConfigurations->AddObject(*c);
+ buildConfigurations->AddObject(c->second);
}
configlist->AddAttribute("buildConfigurations", buildConfigurations);
@@ -3547,10 +3547,9 @@ bool cmGlobalXCodeGenerator
}
}
- for( std::vector<cmXCodeObject*>::iterator i = configs.begin();
- i != configs.end(); ++i)
+ for(Configs::iterator i = configs.begin(); i != configs.end(); ++i)
{
- (*i)->AddAttribute("buildSettings", buildSettings);
+ i->second->AddAttribute("buildSettings", buildSettings);
}
this->RootObject->AddAttribute("buildConfigurationList",