[Cmake-commits] CMake branch, next, updated. v3.0.1-5126-g1826ab1

Brad King brad.king at kitware.com
Wed Sep 3 12:58:05 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  1826ab1531d432c8076c5a505ad723f9a5c9ce4c (commit)
       via  cf92fe2d8428214464401aac12958846e101728a (commit)
      from  edd32628dec594b3d20b461f6a610597bc52aad2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1826ab1531d432c8076c5a505ad723f9a5c9ce4c
commit 1826ab1531d432c8076c5a505ad723f9a5c9ce4c
Merge: edd3262 cf92fe2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 3 12:58:04 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Sep 3 12:58:04 2014 -0400

    Merge topic 'xcode-duplicate-file-refs' into next
    
    cf92fe2d Xcode: Generate per-target file references (#15111)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf92fe2d8428214464401aac12958846e101728a
commit cf92fe2d8428214464401aac12958846e101728a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 3 11:54:05 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 3 12:48:53 2014 -0400

    Xcode: Generate per-target file references (#15111)
    
    Xcode requires a separate PBXFileReference for each target source group
    that references a source file.  Xcode 6 now diagnoses re-use of the same
    PBXFileReference from multiple source groups.  Add the referencing
    target name to our internal map key so we use a per-target reference.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index ee5fc00..b598743 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))

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list