summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-03 17:04:41 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-03 17:04:41 (GMT)
commita1eb90c85d80acf9617ccac73a45b6753188947d (patch)
tree4e07595d1deac05d3dfc4c4b8088afed2f983b3b
parent3c0d87645f5861e9fd6fd78855697f77ef77144e (diff)
parente7114226e6af60b9d214dba26d44648f530e4d96 (diff)
downloadCMake-a1eb90c85d80acf9617ccac73a45b6753188947d.zip
CMake-a1eb90c85d80acf9617ccac73a45b6753188947d.tar.gz
CMake-a1eb90c85d80acf9617ccac73a45b6753188947d.tar.bz2
Merge branch 'backport-xcode-duplicate-file-refs' into release
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 3503e19..f7c2e87 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -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))