diff options
author | Brad King <brad.king@kitware.com> | 2013-02-20 13:09:47 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-02-20 13:09:47 (GMT) |
commit | f7029572ca5948ff87ba0c6e8aaff35f6fdab4f1 (patch) | |
tree | 1aab6d09d45797a2c01e8bbfc4ebd9ec9a1e66e5 /Source/cmGlobalXCodeGenerator.cxx | |
parent | fc7b4d5cf320ca0c3b81be4e7163215d870342c4 (diff) | |
parent | b0051404510e8570b16615ed927a88d07c0ff4e8 (diff) | |
download | CMake-f7029572ca5948ff87ba0c6e8aaff35f6fdab4f1.zip CMake-f7029572ca5948ff87ba0c6e8aaff35f6fdab4f1.tar.gz CMake-f7029572ca5948ff87ba0c6e8aaff35f6fdab4f1.tar.bz2 |
Merge topic 'xcode-target-depends'
b005140 Xcode: Each target dependency edge needs a unique object (#13935)
781ea6d Xcode: Drop check for circular target dependencies
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 60 |
1 files changed, 19 insertions, 41 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b50dc23..fbddc53 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2526,47 +2526,25 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const char* name, void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target, cmXCodeObject* dependTarget) { - // make sure a target does not depend on itself - if(target == dependTarget) - { - return; - } - // now avoid circular references if dependTarget already - // depends on target then skip it. Circular references crashes - // xcode - cmXCodeObject* dependTargetDepends = - dependTarget->GetObject("dependencies"); - if(dependTargetDepends) - { - if(dependTargetDepends->HasObject(target->GetPBXTargetDependency())) - { - return; - } - } - - cmXCodeObject* targetdep = dependTarget->GetPBXTargetDependency(); - 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); - } + // This is called once for every edge in the target dependency graph. + 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())); + cmXCodeObject* targetdep = + this->CreateObject(cmXCodeObject::PBXTargetDependency); + targetdep->SetComment("PBXTargetDependency"); + targetdep->AddAttribute("target", + this->CreateObjectReference(dependTarget)); + targetdep->AddAttribute("targetProxy", + this->CreateObjectReference(container)); cmXCodeObject* depends = target->GetObject("dependencies"); if(!depends) |