summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-04 13:48:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-09-04 13:48:27 (GMT)
commitf7c44eac4c195a3ae416453be551910fdb311ac6 (patch)
tree9410d1109f1bb63273654bf8dbe98dc8984b2090 /Source/cmGlobalXCodeGenerator.cxx
parent1dbb46483a042df7fc9b2579c95d0f4eee988559 (diff)
parentd73f8828ca349bcb97dbc779bf1cf6fde3a62390 (diff)
downloadCMake-f7c44eac4c195a3ae416453be551910fdb311ac6.zip
CMake-f7c44eac4c195a3ae416453be551910fdb311ac6.tar.gz
CMake-f7c44eac4c195a3ae416453be551910fdb311ac6.tar.bz2
Merge topic 'xcode-duplicate-file-refs'
d73f8828 Merge branch 'backport-xcode-duplicate-file-refs' into xcode-duplicate-file-refs cf92fe2d Xcode: Generate per-target file references (#15111) e7114226 Xcode: Generate per-target file references (#15111)
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 3625449..17f838c 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -830,16 +830,14 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
const std::string &lang,
cmSourceFile* sf)
{
- std::string fname = fullpath;
- cmXCodeObject* fileRef = this->FileRefs[fname];
+ std::string 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);
+ this->FileRefs[key] = fileRef;
}
- std::string key = GetGroupMapKeyFromPath(cmtarget, fullpath);
cmXCodeObject* group = this->GroupMap[key];
cmXCodeObject* children = group->GetObject("children");
if (!children->HasObject(fileRef))