diff options
author | Brad King <brad.king@kitware.com> | 2014-09-03 17:04:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-09-03 17:04:41 (GMT) |
commit | a1eb90c85d80acf9617ccac73a45b6753188947d (patch) | |
tree | 4e07595d1deac05d3dfc4c4b8088afed2f983b3b | |
parent | 3c0d87645f5861e9fd6fd78855697f77ef77144e (diff) | |
parent | e7114226e6af60b9d214dba26d44648f530e4d96 (diff) | |
download | CMake-a1eb90c85d80acf9617ccac73a45b6753188947d.zip CMake-a1eb90c85d80acf9617ccac73a45b6753188947d.tar.gz CMake-a1eb90c85d80acf9617ccac73a45b6753188947d.tar.bz2 |
Merge branch 'backport-xcode-duplicate-file-refs' into release
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 10 |
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)) |