Merge branch 'backport-xcode-duplicate-file-refs' into release

This commit is contained in:
Brad King 2014-09-03 13:04:41 -04:00
commit a1eb90c85d
1 changed files with 4 additions and 6 deletions

View File

@ -837,16 +837,14 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
cmTarget& cmtarget,
const std::string &lang)
{
std::string fname = fullpath;
cmXCodeObject* fileRef = this->FileRefs[fname];
cmStdString key = GetGroupMapKeyFromPath(cmtarget, fullpath);
cmXCodeObject* fileRef = this->FileRefs[key];
if(!fileRef)
{
fileRef = this->CreateObject(cmXCodeObject::PBXFileReference);
std::string comment = fname;
fileRef->SetComment(fname.c_str());
this->FileRefs[fname] = fileRef;
fileRef->SetComment(fullpath.c_str());
this->FileRefs[key] = fileRef;
}
cmStdString key = GetGroupMapKeyFromPath(cmtarget, fullpath);
cmXCodeObject* group = this->GroupMap[key];
cmXCodeObject* children = group->GetObject("children");
if (!children->HasObject(fileRef))