| 3333 | } |
| 3334 | |
| 3335 | std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, |
| 3336 | cmGeneratorTarget* gtgt) |
| 3337 | { |
| 3338 | cmList const configList{ this->CurrentMakefile->GetRequiredDefinition( |
| 3339 | "CMAKE_CONFIGURATION_TYPES") }; |
| 3340 | cmXCodeObject* configlist = |
| 3341 | this->CreateObject(cmXCodeObject::XCConfigurationList); |
| 3342 | cmXCodeObject* buildConfigurations = |
| 3343 | this->CreateObject(cmXCodeObject::OBJECT_LIST); |
| 3344 | configlist->AddAttribute("buildConfigurations", buildConfigurations); |
| 3345 | std::string comment = cmStrCat("Build configuration list for ", |
| 3346 | cmXCodeObject::PBXTypeNames[target->GetIsA()], |
| 3347 | " \"", gtgt->GetName(), '"'); |
| 3348 | configlist->SetComment(comment); |
| 3349 | target->AddAttribute("buildConfigurationList", |
| 3350 | this->CreateObjectReference(configlist)); |
| 3351 | for (auto const& i : configList) { |
| 3352 | cmXCodeObject* config = |
| 3353 | this->CreateObject(cmXCodeObject::XCBuildConfiguration); |
| 3354 | buildConfigurations->AddObject(config); |
| 3355 | cmXCodeObject* buildSettings = |
| 3356 | this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); |
| 3357 | this->CreateBuildSettings(gtgt, buildSettings, i); |
| 3358 | config->AddAttribute("name", this->CreateString(i)); |
| 3359 | config->SetComment(i); |
| 3360 | config->AddAttribute("buildSettings", buildSettings); |
| 3361 | |
| 3362 | this->CreateTargetXCConfigSettings(gtgt, config, i); |
| 3363 | } |
| 3364 | if (!configList.empty()) { |
| 3365 | configlist->AddAttribute("defaultConfigurationName", |
| 3366 | this->CreateString(configList[0])); |
| 3367 | configlist->AddAttribute("defaultConfigurationIsVisible", |
| 3368 | this->CreateString("0")); |
| 3369 | return configList[0]; |
| 3370 | } |
| 3371 | return ""; |
| 3372 | } |
| 3373 | |
| 3374 | void cmGlobalXCodeGenerator::CreateGlobalXCConfigSettings( |
| 3375 | cmLocalGenerator* root, cmXCodeObject* config, std::string const& configName) |
no test coverage detected