[cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.156 1.157

cmake-commits at cmake.org cmake-commits at cmake.org
Mon May 28 11:16:52 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9436

Modified Files:
	cmGlobalXCodeGenerator.cxx 
Log Message:
ENH: Remove unused build rules from Xcode.  This change was made in the VS generators on 2006-03-23 and should have been made for the Xcode generator too.  Also commented out some debug print statements.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- cmGlobalXCodeGenerator.cxx	28 May 2007 15:02:45 -0000	1.156
+++ cmGlobalXCodeGenerator.cxx	28 May 2007 15:16:50 -0000	1.157
@@ -772,7 +772,7 @@
     cmXCodeObject* xsf =
       this->CreateXCodeSourceFile(this->CurrentLocalGenerator, 
                                   sf, *target);
-    std::cerr << "copy header " << sf->GetFullPath() << "\n";
+    //std::cerr << "copy header " << sf->GetFullPath() << "\n";
     headersToCopy->AddObject(xsf);
     }
 }
@@ -1515,7 +1515,7 @@
         install_name_dir = install_name_dir + "/..";
         install_name_dir = 
             cmSystemTools::CollapseFullPath(install_name_dir.c_str());
-        std::cerr << "new install name " << install_name_dir << "\n";
+        //std::cerr << "new install name " << install_name_dir << "\n";
         }
       }
     
@@ -2513,9 +2513,7 @@
     {
     return;
     }
-#if 1
-  // TODO: This block should be moved to a central location for all
-  // generators.  It is duplicated in every generator.
+  // Skip local generators that are excluded from this project.
   for(std::vector<cmLocalGenerator*>::iterator g = generators.begin();
       g != generators.end(); ++g)
     {
@@ -2523,54 +2521,8 @@
       {
       continue;
       }
-    cmMakefile* mf = (*g)->GetMakefile();
-    std::vector<cmSourceGroup> sourceGroups = mf->GetSourceGroups();
-    cmTargets &tgts = mf->GetTargets();
-  // now for all custom commands that are not used directly in a 
-  // target, add them to all targets in the current directory or
-  // makefile
-  std::set<cmStdString> banned;
-  banned.insert("ALL_BUILD");
-  banned.insert("XCODE_DEPEND_HELPER");
-  banned.insert("install");
-  std::vector<cmSourceFile*> & classesmf = mf->GetSourceFiles();
-  for(std::vector<cmSourceFile*>::const_iterator i = classesmf.begin(); 
-      i != classesmf.end(); i++)
-    {
-    if(cmCustomCommand* cc = (*i)->GetCustomCommand())
-      {
-      if(!cc->IsUsed())
-        {
-        for(cmTargets::iterator l = tgts.begin(); 
-            l != tgts.end(); l++)
-          {
-          if ((strncmp(l->first.c_str(), 
-                          "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0)
-              && banned.find(l->second.GetName()) == banned.end())
-            {
-            cmTarget& target = l->second;
-            bool sameAsTarget = false;
-            // make sure we don't add a custom command that depends on
-            // this target
-            for(unsigned int k =0; k < cc->GetDepends().size(); k++)
-              {
-              if(cmSystemTools::GetFilenameName
-                 (cc->GetDepends()[k]) == target.GetFullName())
-                {
-                sameAsTarget = true;
-                }
-              }
-            if(!sameAsTarget)
-              {
-              target.AddSourceFile(*i);
-              }
-            }
-          }
-        }
-      }
     }
-    }
-#endif
+
   this->CreateXCodeObjects(root,
                            generators);
   std::string xcodeDir = root->GetMakefile()->GetStartOutputDirectory();



More information about the Cmake-commits mailing list