[Cmake-commits] CMake branch, next, updated. v2.8.5-1436-g0a11f45

David Cole david.cole at kitware.com
Thu Aug 4 16:44:22 EDT 2011


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  0a11f45fc097b6e8850d0e485c47c1c7d84a7b19 (commit)
       via  312d68d5b195255356b444f34be50552bc8981d4 (commit)
      from  e5afff8349c41063f5b6844b86240253ec9f923c (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=0a11f45fc097b6e8850d0e485c47c1c7d84a7b19
commit 0a11f45fc097b6e8850d0e485c47c1c7d84a7b19
Merge: e5afff8 312d68d
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Thu Aug 4 16:44:19 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 4 16:44:19 2011 -0400

    Merge topic 'enable-parallel-xcode-builds' into next
    
    312d68d Xcode: Rearrange CMakeReRun to enable parallel builds


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=312d68d5b195255356b444f34be50552bc8981d4
commit 312d68d5b195255356b444f34be50552bc8981d4
Author:     Johan Björk <phb at spotify.com>
AuthorDate: Tue Jul 26 23:13:42 2011 +0200
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Thu Aug 4 16:31:45 2011 -0400

    Xcode: Rearrange CMakeReRun to enable parallel builds
    
    by isolating the CMakeReRun steps to a ZERO_CHECK target, as
    in the Visual Studio generators. Also, honor the value of
    CMAKE_SUPPRESS_REGENERATION.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b3e2e7a..fd9dacd 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -336,6 +336,9 @@ cmGlobalXCodeGenerator::PostBuildMakeTarget(std::string const& tName,
 }
 
 //----------------------------------------------------------------------------
+#define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK"
+
+//----------------------------------------------------------------------------
 void
 cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
                                         std::vector<cmLocalGenerator*>& gens)
@@ -366,8 +369,18 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
   makecommand.push_back(this->CurrentXCodeHackMakefile.c_str());
   makecommand.push_back(""); // placeholder, see below
 
-  // Add Re-Run CMake rules
-  this->CreateReRunCMakeFile(root, gens);
+  // Add ZERO_CHECK
+  bool regenerate = !mf->IsOn("CMAKE_SUPPRESS_REGENERATION");
+  if (regenerate)
+    {
+    this->CreateReRunCMakeFile(root, gens);
+    std::string file = this->ConvertToRelativeForMake(
+      this->CurrentReRunCMakeMakefile.c_str());
+    cmSystemTools::ReplaceString(file, "\\ ", " ");
+    mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, true, no_depends,
+                          no_working_directory,
+                          "make", "-f", file.c_str());
+    }
 
   // now make the allbuild depend on all the non-utility targets
   // in the project
@@ -379,10 +392,17 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
       {
       continue;
       }
+
     cmTargets& tgts = lg->GetMakefile()->GetTargets();
     for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
       {
       cmTarget& target = l->second;
+
+      if (regenerate && (l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET))
+        {
+        target.AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
+        }
+
       // make all exe, shared libs and modules
       // run the depend check makefile as a post build rule
       // this will make sure that when the next target is built
@@ -402,8 +422,8 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
                                                     cmTarget::POST_BUILD,
                                                     "Depend check for xcode",
                                                     dir.c_str());
-
         }
+
       if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
         {
         allbuild->AddUtility(target.GetName());
@@ -1114,11 +1134,6 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
       commands.push_back(*(*i)->GetCustomCommand());
       }
     }
-  std::vector<cmCustomCommand> reruncom;
-  cmXCodeObject* cmakeReRunPhase =
-    this->CreateBuildPhase("CMake ReRun", "cmakeReRunPhase",
-                           cmtarget, reruncom);
-  buildPhases->AddObject(cmakeReRunPhase);
   // create prebuild phase
   cmXCodeObject* cmakeRulesBuildPhase =
     this->CreateBuildPhase("CMake Rules",
@@ -1207,20 +1222,6 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
                                                 const & commands,
                                                 const char* name)
 {
-  if(strcmp(name, "cmakeReRunPhase") == 0)
-    {
-    std::string cdir = this->CurrentMakefile->GetHomeOutputDirectory();
-    cdir = this->ConvertToRelativeForMake(cdir.c_str());
-    std::string makecmd = "make -C ";
-    makecmd += cdir;
-    makecmd += " -f ";
-    makecmd +=
-      this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile.c_str());
-    cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ ");
-    buildphase->AddAttribute("shellScript",
-                             this->CreateString(makecmd.c_str()));
-    return;
-    }
 
   // collect multiple outputs of custom commands into a set
   // which will be used for every configuration

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

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx |   45 +++++++++++++++++++------------------
 1 files changed, 23 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list