[Cmake-commits] CMake branch, next, updated. v2.8.2-957-g1b0e592

Marcus D. Hanwell marcus.hanwell at kitware.com
Tue Sep 28 18:52:42 EDT 2010


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  1b0e5925cbfe295bbf1e3f8226fdb708ea9efb87 (commit)
       via  1a92548ca29387d65472f63f8401532ae48f293a (commit)
       via  4ebc277a7a64ff9ea93a1b67959c39c6d7bc892f (commit)
       via  68fd37c39938635e992ec47bad2afa13150b9b3d (commit)
      from  97ec9c3b2fad7be5686b40c6484528441b4cd190 (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=1b0e5925cbfe295bbf1e3f8226fdb708ea9efb87
commit 1b0e5925cbfe295bbf1e3f8226fdb708ea9efb87
Merge: 97ec9c3 1a92548
Author:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
AuthorDate: Tue Sep 28 18:52:41 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 28 18:52:41 2010 -0400

    Merge topic 'xcode_source_group_fix_7932' into next
    
    1a92548 Revert previous commit in topic.
    4ebc277 Revert "Fix shadow warning in groups code."
    68fd37c Revert "Fix compile problem from previous commit."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a92548ca29387d65472f63f8401532ae48f293a
commit 1a92548ca29387d65472f63f8401532ae48f293a
Author:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
AuthorDate: Tue Sep 28 18:39:38 2010 -0400
Commit:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
CommitDate: Tue Sep 28 18:47:21 2010 -0400

    Revert previous commit in topic.
    
    Revert "XCode Source Grouping now allows for multiple levels of source groups (7932)."
    
    This reverts commit 1c2e17f2afe4dfcb2dac543af4a21121722b38f9.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 3603ddf..e238c2b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1073,7 +1073,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
   std::vector<cmSourceFile*>const &classes = cmtarget.GetSourceFiles();
   // add all the sources
   std::vector<cmCustomCommand> commands;
-  for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); 
+  for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
       i != classes.end(); ++i)
     {
     if((*i)->GetCustomCommand())
@@ -2443,14 +2443,10 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
         std::string const& source = sf->GetFullPath();
         cmSourceGroup& sourceGroup =
           mf->FindSourceGroup(source.c_str(), sourceGroups);
-            sourceGroup.AssignSource( sf );
-        }
-
-      // Create all of the groups that should be created for this target.
-      // Loop through every source group.
-      for(unsigned int i = 0; i < sourceGroups.size(); ++i)
-        {
-        this->CreateSourceGroup( sourceGroups[i], cmtarget, false );
+        cmXCodeObject* pbxgroup =
+          this->CreateOrGetPBXGroup(cmtarget, &sourceGroup);
+        cmStdString key = GetGroupMapKey(cmtarget, sf);
+        this->GroupMap[key] = pbxgroup;
         }
       }
     }
@@ -2458,45 +2454,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
 
 //----------------------------------------------------------------------------
 cmXCodeObject* cmGlobalXCodeGenerator
-::CreateSourceGroup( cmSourceGroup& sg, cmTarget& cmtarget, bool child_group )
-{
-  // Only do something with the group if there are files or child groups
-  if( !sg.GetSourceFiles().empty() || !sg.GetGroupChildren().empty() )
-    {
-    cmXCodeObject* pbxgroup =
-      this->CreateOrGetPBXGroup(cmtarget, &sg, !child_group);
-
-    std::vector<const cmSourceFile*>& sources = sg.GetSourceFiles();
-    // Get all the source files and add them to the GroupMap
-    for(std::vector<const cmSourceFile*>::const_iterator s = sources.begin();
-        s != sources.end(); s++)
-      {
-      cmStdString key = GetGroupMapKey(cmtarget, (cmSourceFile*)*s);
-      this->GroupMap[key] = pbxgroup;
-      }
-
-    // Do the child groups
-    std::vector<cmSourceGroup> children  = sg.GetGroupChildren();
-    cmXCodeObject* groupChildren = pbxgroup->GetObject("children");
-
-    for(unsigned int i=0;i<children.size();++i)
-      {
-      cmXCodeObject* group =
-        this->CreateSourceGroup( children[i], cmtarget, true );
-      if (group)
-        {
-        groupChildren->AddObject(group);
-        }
-      }
-    return pbxgroup;
-    }
-  return NULL;
-}
-
-
-//----------------------------------------------------------------------------
-cmXCodeObject* cmGlobalXCodeGenerator
-::CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg, bool child_group)
+::CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg)
 {
   cmStdString s = cmtarget.GetName();
   s += "/";
@@ -2517,7 +2475,7 @@ cmXCodeObject* cmGlobalXCodeGenerator
     {
     tgroup = this->CreateObject(cmXCodeObject::PBXGroup);
     this->TargetGroup[cmtarget.GetName()] = tgroup;
-    cmXCodeObject* tgroupChildren = 
+    cmXCodeObject* tgroupChildren =
       this->CreateObject(cmXCodeObject::OBJECT_LIST);
     tgroup->AddAttribute("name", this->CreateString(cmtarget.GetName()));
     tgroup->AddAttribute("children", tgroupChildren);
@@ -2538,6 +2496,7 @@ cmXCodeObject* cmGlobalXCodeGenerator
     return tgroup;
     }
 
+  cmXCodeObject* tgroupChildren = tgroup->GetObject("children");
   cmXCodeObject* group = this->CreateObject(cmXCodeObject::PBXGroup);
   cmXCodeObject* groupChildren =
     this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -2548,11 +2507,7 @@ cmXCodeObject* cmGlobalXCodeGenerator
     group->AddAttribute("refType", this->CreateString("4"));
     }
   group->AddAttribute("sourceTree", this->CreateString("<group>"));
-  if( child_group )
-    {
-    cmXCodeObject* tgroupChildren = tgroup->GetObject("children");
-    tgroupChildren->AddObject(group);
-    }
+  tgroupChildren->AddObject(group);
   this->GroupNameMap[s] = group;
   return group;
 }
@@ -2652,7 +2607,8 @@ void cmGlobalXCodeGenerator
     this->CreateObject(cmXCodeObject::OBJECT_LIST);
   productGroup->AddAttribute("children", productGroupChildren);
   this->MainGroupChildren->AddObject(productGroup);
-  
+
+
   this->RootObject = this->CreateObject(cmXCodeObject::PBXProject);
   this->RootObject->SetComment("Project object");
   group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index d4e98e8..b4de805 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -87,13 +87,10 @@ public:
 
 private: 
   cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget,
-                                     cmSourceGroup* sg,
-                                     bool child_group);
+                                     cmSourceGroup* sg);
   void CreateGroups(cmLocalGenerator* root,
                     std::vector<cmLocalGenerator*>&
                     generators);
-  cmXCodeObject* CreateSourceGroup( cmSourceGroup& sg,
-                                    cmTarget& cmtarget, bool child_group );
   std::string XCodeEscapePath(const char* p);
   std::string RelativeToSource(const char* p);
   std::string RelativeToBinary(const char* p);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ebc277a7a64ff9ea93a1b67959c39c6d7bc892f
commit 4ebc277a7a64ff9ea93a1b67959c39c6d7bc892f
Author:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
AuthorDate: Tue Sep 28 18:39:35 2010 -0400
Commit:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
CommitDate: Tue Sep 28 18:39:35 2010 -0400

    Revert "Fix shadow warning in groups code."
    
    This reverts commit 4ebc24657eab201a14ee44c41540609bd86a9397.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 78df0e4..3603ddf 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2448,7 +2448,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
 
       // Create all of the groups that should be created for this target.
       // Loop through every source group.
-      for(unsigned int idx = 0; idx < sourceGroups.size(); ++idx)
+      for(unsigned int i = 0; i < sourceGroups.size(); ++i)
         {
         this->CreateSourceGroup( sourceGroups[i], cmtarget, false );
         }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68fd37c39938635e992ec47bad2afa13150b9b3d
commit 68fd37c39938635e992ec47bad2afa13150b9b3d
Author:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
AuthorDate: Tue Sep 28 18:39:27 2010 -0400
Commit:     Marcus D. Hanwell <marcus.hanwell at kitware.com>
CommitDate: Tue Sep 28 18:39:27 2010 -0400

    Revert "Fix compile problem from previous commit."
    
    This reverts commit 19a9a1d57c84352461ce127fa2200e94ee308a52.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 57f2f3a..78df0e4 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2450,7 +2450,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
       // Loop through every source group.
       for(unsigned int idx = 0; idx < sourceGroups.size(); ++idx)
         {
-        this->CreateSourceGroup( sourceGroups[idx], cmtarget, false );
+        this->CreateSourceGroup( sourceGroups[i], cmtarget, false );
         }
       }
     }

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

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx |   66 ++++++------------------------------
 Source/cmGlobalXCodeGenerator.h   |    5 +--
 2 files changed, 12 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list