Merge topic 'xcode-target-depends'
b005140 Xcode: Each target dependency edge needs a unique object (#13935) 781ea6d Xcode: Drop check for circular target dependencies
This commit is contained in:
commit
f7029572ca
@ -2526,47 +2526,25 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const char* name,
|
|||||||
void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target,
|
void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target,
|
||||||
cmXCodeObject* dependTarget)
|
cmXCodeObject* dependTarget)
|
||||||
{
|
{
|
||||||
// make sure a target does not depend on itself
|
// This is called once for every edge in the target dependency graph.
|
||||||
if(target == dependTarget)
|
cmXCodeObject* container =
|
||||||
{
|
this->CreateObject(cmXCodeObject::PBXContainerItemProxy);
|
||||||
return;
|
container->SetComment("PBXContainerItemProxy");
|
||||||
}
|
container->AddAttribute("containerPortal",
|
||||||
// now avoid circular references if dependTarget already
|
this->CreateObjectReference(this->RootObject));
|
||||||
// depends on target then skip it. Circular references crashes
|
container->AddAttribute("proxyType", this->CreateString("1"));
|
||||||
// xcode
|
container->AddAttribute("remoteGlobalIDString",
|
||||||
cmXCodeObject* dependTargetDepends =
|
this->CreateObjectReference(dependTarget));
|
||||||
dependTarget->GetObject("dependencies");
|
container->AddAttribute("remoteInfo",
|
||||||
if(dependTargetDepends)
|
this->CreateString(
|
||||||
{
|
dependTarget->GetTarget()->GetName()));
|
||||||
if(dependTargetDepends->HasObject(target->GetPBXTargetDependency()))
|
cmXCodeObject* targetdep =
|
||||||
{
|
this->CreateObject(cmXCodeObject::PBXTargetDependency);
|
||||||
return;
|
targetdep->SetComment("PBXTargetDependency");
|
||||||
}
|
targetdep->AddAttribute("target",
|
||||||
}
|
this->CreateObjectReference(dependTarget));
|
||||||
|
targetdep->AddAttribute("targetProxy",
|
||||||
cmXCodeObject* targetdep = dependTarget->GetPBXTargetDependency();
|
this->CreateObjectReference(container));
|
||||||
if(!targetdep)
|
|
||||||
{
|
|
||||||
cmXCodeObject* container =
|
|
||||||
this->CreateObject(cmXCodeObject::PBXContainerItemProxy);
|
|
||||||
container->SetComment("PBXContainerItemProxy");
|
|
||||||
container->AddAttribute("containerPortal",
|
|
||||||
this->CreateObjectReference(this->RootObject));
|
|
||||||
container->AddAttribute("proxyType", this->CreateString("1"));
|
|
||||||
container->AddAttribute("remoteGlobalIDString",
|
|
||||||
this->CreateObjectReference(dependTarget));
|
|
||||||
container->AddAttribute("remoteInfo",
|
|
||||||
this->CreateString(
|
|
||||||
dependTarget->GetTarget()->GetName()));
|
|
||||||
targetdep =
|
|
||||||
this->CreateObject(cmXCodeObject::PBXTargetDependency);
|
|
||||||
targetdep->SetComment("PBXTargetDependency");
|
|
||||||
targetdep->AddAttribute("target",
|
|
||||||
this->CreateObjectReference(dependTarget));
|
|
||||||
targetdep->AddAttribute("targetProxy",
|
|
||||||
this->CreateObjectReference(container));
|
|
||||||
dependTarget->SetPBXTargetDependency(targetdep);
|
|
||||||
}
|
|
||||||
|
|
||||||
cmXCodeObject* depends = target->GetObject("dependencies");
|
cmXCodeObject* depends = target->GetObject("dependencies");
|
||||||
if(!depends)
|
if(!depends)
|
||||||
|
@ -38,7 +38,6 @@ cmXCodeObject::~cmXCodeObject()
|
|||||||
cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
|
cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
|
||||||
{
|
{
|
||||||
this->Version = 15;
|
this->Version = 15;
|
||||||
this->PBXTargetDependencyValue = 0;
|
|
||||||
this->Target = 0;
|
this->Target = 0;
|
||||||
this->Object =0;
|
this->Object =0;
|
||||||
|
|
||||||
|
@ -120,14 +120,6 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmXCodeObject* GetPBXTargetDependency()
|
|
||||||
{
|
|
||||||
return this->PBXTargetDependencyValue;
|
|
||||||
}
|
|
||||||
void SetPBXTargetDependency(cmXCodeObject* d)
|
|
||||||
{
|
|
||||||
this->PBXTargetDependencyValue = d;
|
|
||||||
}
|
|
||||||
void CopyAttributes(cmXCodeObject* );
|
void CopyAttributes(cmXCodeObject* );
|
||||||
|
|
||||||
void AddDependLibrary(const char* configName,
|
void AddDependLibrary(const char* configName,
|
||||||
@ -170,7 +162,6 @@ protected:
|
|||||||
cmStdString Comment;
|
cmStdString Comment;
|
||||||
cmStdString String;
|
cmStdString String;
|
||||||
cmXCodeObject* Object;
|
cmXCodeObject* Object;
|
||||||
cmXCodeObject* PBXTargetDependencyValue;
|
|
||||||
std::vector<cmXCodeObject*> List;
|
std::vector<cmXCodeObject*> List;
|
||||||
std::map<cmStdString, StringVec> DependLibraries;
|
std::map<cmStdString, StringVec> DependLibraries;
|
||||||
std::map<cmStdString, StringVec> DependTargets;
|
std::map<cmStdString, StringVec> DependTargets;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user