MCPcopy Index your code
hub / github.com/Kitware/CMake / CreateXCodeObjects

Method CreateXCodeObjects

Source/cmGlobalXCodeGenerator.cxx:4668–4965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4666}
4667
4668bool cmGlobalXCodeGenerator::CreateXCodeObjects(
4669 cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators)
4670{
4671 this->ClearXCodeObjects();
4672 this->RootObject = nullptr;
4673 this->MainGroupChildren = nullptr;
4674 this->FrameworkGroup = nullptr;
4675 cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
4676 group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
4677 cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
4678 for (std::string const& CurrentConfigurationType :
4679 this->CurrentConfigurationTypes) {
4680 cmXCodeObject* buildStyle =
4681 this->CreateObject(cmXCodeObject::PBXBuildStyle);
4682 std::string const& name = CurrentConfigurationType;
4683 buildStyle->AddAttribute("name", this->CreateString(name));
4684 buildStyle->SetComment(name);
4685 cmXCodeObject* sgroup = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
4686 sgroup->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
4687 buildStyle->AddAttribute("buildSettings", sgroup);
4688 listObjs->AddObject(buildStyle);
4689 }
4690
4691 cmXCodeObject* mainGroup = this->CreateObject(cmXCodeObject::PBXGroup);
4692 this->MainGroupChildren = this->CreateObject(cmXCodeObject::OBJECT_LIST);
4693 mainGroup->AddAttribute("children", this->MainGroupChildren);
4694 mainGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
4695
4696 // now create the cmake groups
4697 if (!this->CreateGroups(generators)) {
4698 return false;
4699 }
4700
4701 cmXCodeObject* productGroup = this->CreateObject(cmXCodeObject::PBXGroup);
4702 productGroup->AddAttribute("name", this->CreateString("Products"));
4703 productGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
4704 cmXCodeObject* productGroupChildren =
4705 this->CreateObject(cmXCodeObject::OBJECT_LIST);
4706 productGroup->AddAttribute("children", productGroupChildren);
4707 this->MainGroupChildren->AddObject(productGroup);
4708
4709 this->FrameworkGroup = this->CreateObject(cmXCodeObject::PBXGroup);
4710 this->FrameworkGroup->AddAttribute("name", this->CreateString("Frameworks"));
4711 this->FrameworkGroup->AddAttribute("sourceTree",
4712 this->CreateString("<group>"));
4713 cmXCodeObject* frameworkGroupChildren =
4714 this->CreateObject(cmXCodeObject::OBJECT_LIST);
4715 this->FrameworkGroup->AddAttribute("children", frameworkGroupChildren);
4716 this->MainGroupChildren->AddObject(this->FrameworkGroup);
4717
4718 this->ResourcesGroup = this->CreateObject(cmXCodeObject::PBXGroup);
4719 this->ResourcesGroup->AddAttribute("name", this->CreateString("Resources"));
4720 this->ResourcesGroup->AddAttribute("sourceTree",
4721 this->CreateString("<group>"));
4722 cmXCodeObject* ResourcesGroupChildren =
4723 this->CreateObject(cmXCodeObject::OBJECT_LIST);
4724 this->ResourcesGroup->AddAttribute("children", ResourcesGroupChildren);
4725 this->MainGroupChildren->AddObject(this->ResourcesGroup);

Callers 1

OutputXCodeProjectMethod · 0.95

Calls 15

ClearXCodeObjectsMethod · 0.95
CreateObjectMethod · 0.95
CreateStringMethod · 0.95
CreateGroupsMethod · 0.95
GetOrCreateIdMethod · 0.95
CreateObjectReferenceMethod · 0.95
RelativeToBinaryMethod · 0.95
ComputeArchitecturesMethod · 0.95
GetSymrootDirMethod · 0.95
CreateFlatCloneMethod · 0.95
ParseKnownAttributesMethod · 0.95

Tested by

no test coverage detected