[Cmake-commits] CMake branch, next, updated. v3.3.0-2033-g026814a

Stephen Kelly steveire at gmail.com
Thu Aug 6 18:36:56 EDT 2015


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  026814ad56e9da194baa1597a4de222227920ca5 (commit)
       via  97eb20f5421c5cfff2df84617404686089ea71fc (commit)
       via  2d60391127bb5be1b4d55a44f8fbc406a3c4eff6 (commit)
       via  efb9ccca7fd0bb2ca0ec6f4f65d0b4f0ccb83ad4 (commit)
       via  f62f61a08402f7e4239674fd03a6e93631017021 (commit)
       via  ad2b607bf7d072fe3c7363446cb81884be7f4221 (commit)
       via  a58ead9b2f2c8810d8841975ab18486cacb149e9 (commit)
       via  7965ba9d008172695aeeb48d327e3942c3684fa9 (commit)
       via  a57b7aa45efdad49fc8ba2c9ea0525ab5c991b2c (commit)
       via  d8d6f19e30d0568f1af1297dd616fba0901c388e (commit)
       via  76d273e3fbab5af282a6402f66820ed926da7717 (commit)
       via  0c86673edbb9956dc29c31242e244fb1b02013c7 (commit)
       via  ef2771706a641607c146edc738f76e0205ed8577 (commit)
       via  13b878b534dbfeb2995569f486e3b0684ef584aa (commit)
       via  2ee3bd6f3e99be2dc1bf2b3111681838f0b8d268 (commit)
      from  d78e96868e693343cef845dff140432d08e543db (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=026814ad56e9da194baa1597a4de222227920ca5
commit 026814ad56e9da194baa1597a4de222227920ca5
Merge: d78e968 97eb20f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Aug 6 18:36:53 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 6 18:36:53 2015 -0400

    Merge topic 'global-generator-makefiles' into next
    
    97eb20f5 cmQtAutoGenerators: Prefer a generator to access global generator.
    2d603911 cmGlobalGenerator: Port Find API to cmMakefile.
    efb9ccca cmGlobalGenerator: Create global targets from cmMakefiles.
    f62f61a0 cmGlobalGenerator: Port global target creation to cmMakefile.
    ad2b607b cmGlobalGenerator: Port Configure-time check to cmMakefile.
    a58ead9b cmGlobalGenerator: Base final target property computation on Makefiles.
    7965ba9d cmGlobalGenerator: Base progress on Makefiles, not LocalGenerators.
    a57b7aa4 cmExportLibraryDependenciesCommand: Port to cmMakefile.
    d8d6f19e cmGlobalGenerator: Port configure-time code to cmMakefile.
    76d273e3 cmake: Port configure-time code to cmMakefile.
    0c86673e cmGlobalGenerator: Store a container of cmMakefiles.
    ef277170 cmGeneratorTarget: Port internal type to cmGeneratorTarget.
    13b878b5 cmGeneratorTarget: Prefer the local generator to access the global.
    2ee3bd6f cmGlobalVisualStudioGenerator: Simplify access to cmGeneratorTarget.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97eb20f5421c5cfff2df84617404686089ea71fc
commit 97eb20f5421c5cfff2df84617404686089ea71fc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 20:39:24 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:58 2015 +0200

    cmQtAutoGenerators: Prefer a generator to access global generator.

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index f1ba2f4..c619cdc 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -369,7 +369,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg,
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
   bool usePRE_BUILD = false;
-  cmGlobalGenerator* gg = makefile->GetGlobalGenerator();
+  cmGlobalGenerator* gg = lg->GetGlobalGenerator();
   if(gg->GetName().find("Visual Studio") != std::string::npos)
     {
     cmGlobalVisualStudioGenerator* vsgg =
@@ -396,7 +396,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg,
 
   std::vector<std::string> rcc_output;
   bool const isNinja =
-    makefile->GetGlobalGenerator()->GetName() == "Ninja";
+    lg->GetGlobalGenerator()->GetName() == "Ninja";
   if(isNinja
 #if defined(_WIN32) && !defined(__CYGWIN__)
         || usePRE_BUILD

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d60391127bb5be1b4d55a44f8fbc406a3c4eff6
commit 2d60391127bb5be1b4d55a44f8fbc406a3c4eff6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:39:51 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:58 2015 +0200

    cmGlobalGenerator: Port Find API to cmMakefile.

diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index c056d95..2558876 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -51,10 +51,8 @@ bool cmGetDirectoryPropertyCommand
     sd = cmSystemTools::CollapseFullPath(sd);
 
     // lookup the makefile from the directory name
-    cmLocalGenerator *lg =
-      this->Makefile->GetGlobalGenerator()->
-      FindLocalGenerator(sd);
-    if (!lg)
+    dir = this->Makefile->GetGlobalGenerator()->FindMakefile(sd);
+    if (!dir)
       {
       this->SetError
         ("DIRECTORY argument provided but requested directory not found. "
@@ -62,7 +60,6 @@ bool cmGetDirectoryPropertyCommand
          "it is valid but has not been processed yet.");
       return false;
       }
-    dir = lg->GetMakefile();
     ++i;
     }
 
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 33d638b..4c42f53 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -262,13 +262,8 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
     dir = cmSystemTools::CollapseFullPath(dir);
 
     // Lookup the generator.
-    if(cmLocalGenerator* lg =
-       (this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir)))
-      {
-      // Use the makefile for the directory found.
-      mf = lg->GetMakefile();
-      }
-    else
+    mf = this->Makefile->GetGlobalGenerator()->FindMakefile(dir);
+    if (!mf)
       {
       // Could not find the directory.
       this->SetError
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8645317..1e2d091 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2160,6 +2160,20 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
     }
 }
 
+cmMakefile*
+cmGlobalGenerator::FindMakefile(const std::string& start_dir) const
+{
+  for(std::vector<cmMakefile*>::const_iterator it =
+      this->Makefiles.begin(); it != this->Makefiles.end(); ++it)
+    {
+    std::string sd = (*it)->GetCurrentSourceDirectory();
+    if (sd == start_dir)
+      {
+      return *it;
+      }
+    }
+  return 0;
+}
 
 ///! Find a local generator by its startdirectory
 cmLocalGenerator*
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 616011f..778d946 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -256,6 +256,7 @@ public:
       that is a framework. */
   bool NameResolvesToFramework(const std::string& libname) const;
 
+  cmMakefile* FindMakefile(const std::string& start_dir) const;
   ///! Find a local generator by its startdirectory
   cmLocalGenerator* FindLocalGenerator(const std::string& start_dir) const;
 
diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx
index 31e460f..17ad475 100644
--- a/Source/cmSetPropertyCommand.cxx
+++ b/Source/cmSetPropertyCommand.cxx
@@ -205,14 +205,8 @@ bool cmSetPropertyCommand::HandleDirectoryMode()
     // The local generators are associated with collapsed paths.
     dir = cmSystemTools::CollapseFullPath(dir);
 
-    // Lookup the generator.
-    if(cmLocalGenerator* lg =
-       this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir))
-      {
-      // Use the makefile for the directory found.
-      mf = lg->GetMakefile();
-      }
-    else
+    mf = this->Makefile->GetGlobalGenerator()->FindMakefile(dir);
+    if (!mf)
       {
       // Could not find the directory.
       this->SetError

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efb9ccca7fd0bb2ca0ec6f4f65d0b4f0ccb83ad4
commit efb9ccca7fd0bb2ca0ec6f4f65d0b4f0ccb83ad4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:57:06 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:57 2015 +0200

    cmGlobalGenerator: Create global targets from cmMakefiles.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index f96cf21..8645317 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1193,9 +1193,9 @@ void cmGlobalGenerator::Configure()
   cmTargets globalTargets;
   this->CreateDefaultGlobalTargets(&globalTargets);
 
-  for (i = 0; i < this->LocalGenerators.size(); ++i)
+  for (i = 0; i < this->Makefiles.size(); ++i)
     {
-    cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
+    cmMakefile* mf = this->Makefiles[i];
     cmTargets* targets = &(mf->GetTargets());
     cmTargets::iterator tit;
     for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f62f61a08402f7e4239674fd03a6e93631017021
commit f62f61a08402f7e4239674fd03a6e93631017021
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:48:08 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:57 2015 +0200

    cmGlobalGenerator: Port global target creation to cmMakefile.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 98961d8..f96cf21 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2247,7 +2247,7 @@ inline std::string removeQuotes(const std::string& s)
 
 void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 {
-  cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
+  cmMakefile* mf = this->Makefiles[0];
   const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir();
 
   // CPack

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad2b607bf7d072fe3c7363446cb81884be7f4221
commit ad2b607bf7d072fe3c7363446cb81884be7f4221
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:45:17 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:57 2015 +0200

    cmGlobalGenerator: Port Configure-time check to cmMakefile.
    
    This uses no generate-time state.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 83bfe57..98961d8 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1641,11 +1641,11 @@ void cmGlobalGenerator::CheckLocalGenerators()
 //  std::set<std::string> notFoundMap;
   // after it is all done do a ConfigureFinalPass
   cmState* state = this->GetCMakeInstance()->GetState();
-  for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
+  for (unsigned int i = 0; i < this->Makefiles.size(); ++i)
     {
-    this->LocalGenerators[i]->GetMakefile()->ConfigureFinalPass();
+    this->Makefiles[i]->ConfigureFinalPass();
     cmTargets &targets =
-      this->LocalGenerators[i]->GetMakefile()->GetTargets();
+      this->Makefiles[i]->GetTargets();
     for (cmTargets::iterator l = targets.begin();
          l != targets.end(); l++)
       {
@@ -1700,15 +1700,14 @@ void cmGlobalGenerator::CheckLocalGenerators()
             }
           std::string text = notFoundMap[varName];
           text += "\n   used as include directory in directory ";
-          text += this->LocalGenerators[i]
-                      ->GetMakefile()->GetCurrentSourceDirectory();
+          text += this->Makefiles[i]->GetCurrentSourceDirectory();
           notFoundMap[varName] = text;
           }
         }
       }
     this->CMakeInstance->UpdateProgress
       ("Configuring", 0.9f+0.1f*(static_cast<float>(i)+1.0f)/
-        static_cast<float>(this->LocalGenerators.size()));
+        static_cast<float>(this->Makefiles.size()));
     }
 
   if(!notFoundMap.empty())

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a58ead9b2f2c8810d8841975ab18486cacb149e9
commit a58ead9b2f2c8810d8841975ab18486cacb149e9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:17:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:56 2015 +0200

    cmGlobalGenerator: Base final target property computation on Makefiles.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5787a9d..83bfe57 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1482,9 +1482,9 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
 void cmGlobalGenerator::FinalizeTargetCompileInfo()
 {
   // Construct per-target generator information.
-  for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
+  for(unsigned int i=0; i < this->Makefiles.size(); ++i)
     {
-    cmMakefile *mf = this->LocalGenerators[i]->GetMakefile();
+    cmMakefile *mf = this->Makefiles[i];
 
     const cmStringRange noconfig_compile_definitions =
                                 mf->GetCompileDefinitionsEntries();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7965ba9d008172695aeeb48d327e3942c3684fa9
commit 7965ba9d008172695aeeb48d327e3942c3684fa9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:13:41 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:56 2015 +0200

    cmGlobalGenerator: Base progress on Makefiles, not LocalGenerators.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5266b23..5787a9d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1148,9 +1148,9 @@ void cmGlobalGenerator::Configure()
   // update the cache entry for the number of local generators, this is used
   // for progress
   char num[100];
-  sprintf(num,"%d",static_cast<int>(this->LocalGenerators.size()));
+  sprintf(num,"%d",static_cast<int>(this->Makefiles.size()));
   this->GetCMakeInstance()->AddCacheEntry
-    ("CMAKE_NUMBER_OF_LOCAL_GENERATORS", num,
+    ("CMAKE_NUMBER_OF_MAKEFILES", num,
      "number of local generators", cmState::INTERNAL);
 
   // check for link libraries and include directories containing "NOTFOUND"
@@ -1742,9 +1742,9 @@ int cmGlobalGenerator::TryCompile(const std::string& srcdir,
   // take the bulk of the time, so try and guess some progress
   // by getting closer and closer to 100 without actually getting there.
   if (!this->CMakeInstance->GetState()->GetInitializedCacheValue
-      ("CMAKE_NUMBER_OF_LOCAL_GENERATORS"))
+      ("CMAKE_NUMBER_OF_MAKEFILES"))
     {
-    // If CMAKE_NUMBER_OF_LOCAL_GENERATORS is not set
+    // If CMAKE_NUMBER_OF_MAKEFILES is not set
     // we are in the first time progress and we have no
     // idea how long it will be.  So, just move 1/10th of the way
     // there each time, and don't go over 95%
@@ -1935,22 +1935,16 @@ std::string cmGlobalGenerator::GenerateCMakeBuildCommand(
 void cmGlobalGenerator::AddMakefile(cmMakefile *mf)
 {
   this->Makefiles.push_back(mf);
-}
-
-//----------------------------------------------------------------------------
-void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg)
-{
-  this->LocalGenerators.push_back(lg);
 
   // update progress
   // estimate how many lg there will be
   const char *numGenC =
     this->CMakeInstance->GetState()->GetInitializedCacheValue
-    ("CMAKE_NUMBER_OF_LOCAL_GENERATORS");
+    ("CMAKE_NUMBER_OF_MAKEFILES");
 
   if (!numGenC)
     {
-    // If CMAKE_NUMBER_OF_LOCAL_GENERATORS is not set
+    // If CMAKE_NUMBER_OF_MAKEFILES is not set
     // we are in the first time progress and we have no
     // idea how long it will be.  So, just move half way
     // there each time, and don't go over 95%
@@ -1965,7 +1959,7 @@ void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg)
     }
 
   int numGen = atoi(numGenC);
-  float prog = 0.9f*static_cast<float>(this->LocalGenerators.size())/
+  float prog = 0.9f*static_cast<float>(this->Makefiles.size())/
     static_cast<float>(numGen);
   if (prog > 0.9f)
     {
@@ -1974,6 +1968,12 @@ void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg)
   this->CMakeInstance->UpdateProgress("Configuring", prog);
 }
 
+//----------------------------------------------------------------------------
+void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg)
+{
+  this->LocalGenerators.push_back(lg);
+}
+
 void cmGlobalGenerator::AddInstallComponent(const char* component)
 {
   if(component && *component)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a57b7aa45efdad49fc8ba2c9ea0525ab5c991b2c
commit a57b7aa45efdad49fc8ba2c9ea0525ab5c991b2c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 13:18:30 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:56 2015 +0200

    cmExportLibraryDependenciesCommand: Port to cmMakefile.

diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx
index cb150a7..fde8fb1 100644
--- a/Source/cmExportLibraryDependenciesCommand.cxx
+++ b/Source/cmExportLibraryDependenciesCommand.cxx
@@ -11,7 +11,6 @@
 ============================================================================*/
 #include "cmExportLibraryDependenciesCommand.h"
 #include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
 #include "cmGeneratedFileStream.h"
 #include "cmake.h"
 #include "cmVersion.h"
@@ -82,15 +81,14 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
   // the project.
   cmake* cm = this->Makefile->GetCMakeInstance();
   cmGlobalGenerator* global = cm->GetGlobalGenerator();
-  const std::vector<cmLocalGenerator *>& locals = global->GetLocalGenerators();
+  const std::vector<cmMakefile*>& locals = global->GetMakefiles();
   std::map<std::string, std::string> libDepsOld;
   std::map<std::string, std::string> libDepsNew;
   std::map<std::string, std::string> libTypes;
-  for(std::vector<cmLocalGenerator *>::const_iterator i = locals.begin();
+  for(std::vector<cmMakefile*>::const_iterator i = locals.begin();
       i != locals.end(); ++i)
     {
-    const cmLocalGenerator* gen = *i;
-    const cmTargets &tgts = gen->GetMakefile()->GetTargets();
+    const cmTargets &tgts = (*i)->GetTargets();
     for(cmTargets::const_iterator l = tgts.begin();
         l != tgts.end(); ++l)
       {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8d6f19e30d0568f1af1297dd616fba0901c388e
commit d8d6f19e30d0568f1af1297dd616fba0901c388e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 20:26:32 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:56 2015 +0200

    cmGlobalGenerator: Port configure-time code to cmMakefile.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 749ab6e..5266b23 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2821,9 +2821,9 @@ cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
   }
 
   // Shorten the output name (in expected use case).
-  cmLocalGenerator* lg = this->GetLocalGenerators()[0];
-  std::string fname = lg->Convert(outputs[0],
-                                  cmLocalGenerator::HOME_OUTPUT);
+  cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot());
+  std::string fname = converter.Convert(
+        outputs[0], cmLocalGenerator::HOME_OUTPUT);
 
   // Associate the hash with this output.
   this->RuleHashes[fname] = hash;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76d273e3fbab5af282a6402f66820ed926da7717
commit 76d273e3fbab5af282a6402f66820ed926da7717
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 13:15:47 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:55 2015 +0200

    cmake: Port configure-time code to cmMakefile.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8c455b2..d1e6265 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1592,7 +1592,7 @@ int cmake::ActualConfigure()
       }
     }
 
-  cmMakefile* mf=this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
+  cmMakefile* mf=this->GlobalGenerator->GetMakefiles()[0];
   if (mf->IsOn("CTEST_USE_LAUNCHERS")
               && !this->State->GetGlobalProperty("RULE_LAUNCH_COMPILE"))
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c86673edbb9956dc29c31242e244fb1b02013c7
commit 0c86673edbb9956dc29c31242e244fb1b02013c7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 20:21:22 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:55 2015 +0200

    cmGlobalGenerator: Store a container of cmMakefiles.
    
    For use at configure-time.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3c818ff..749ab6e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1129,6 +1129,7 @@ void cmGlobalGenerator::Configure()
 
   // start with this directory
   cmLocalGenerator *lg = this->MakeLocalGenerator();
+  this->Makefiles.push_back(lg->GetMakefile());
   this->LocalGenerators.push_back(lg);
 
   // set the Start directories
@@ -1599,6 +1600,8 @@ void cmGlobalGenerator::ClearGeneratorMembers()
   cmDeleteAll(this->BuildExportSets);
   this->BuildExportSets.clear();
 
+  this->Makefiles.clear();
+
   cmDeleteAll(this->LocalGenerators);
   this->LocalGenerators.clear();
 
@@ -1929,6 +1932,12 @@ std::string cmGlobalGenerator::GenerateCMakeBuildCommand(
 }
 
 //----------------------------------------------------------------------------
+void cmGlobalGenerator::AddMakefile(cmMakefile *mf)
+{
+  this->Makefiles.push_back(mf);
+}
+
+//----------------------------------------------------------------------------
 void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg)
 {
   this->LocalGenerators.push_back(lg);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 3402fbc..616011f 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -173,6 +173,8 @@ public:
   cmake *GetCMakeInstance() const { return this->CMakeInstance; }
 
   void SetConfiguredFilesPath(cmGlobalGenerator* gen);
+  const std::vector<cmMakefile*>& GetMakefiles() const {
+    return this->Makefiles;}
   const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
     return this->LocalGenerators;}
 
@@ -184,6 +186,7 @@ public:
   void SetCurrentMakefile(cmMakefile* mf)
   {this->CurrentMakefile = mf;}
 
+  void AddMakefile(cmMakefile *mf);
   void AddLocalGenerator(cmLocalGenerator *lg);
 
   ///! Set an generator for an "external makefile based project"
@@ -402,6 +405,7 @@ protected:
   std::string FindMakeProgramFile;
   std::string ConfiguredFilesPath;
   cmake *CMakeInstance;
+  std::vector<cmMakefile*> Makefiles;
   std::vector<cmLocalGenerator *> LocalGenerators;
   cmMakefile* CurrentMakefile;
   // map from project name to vector of local generators in that project
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 60a11e1..85bc493 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1857,6 +1857,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
   // create a new local generator and set its parent
   cmLocalGenerator *lg2 = this->GetGlobalGenerator()
         ->MakeLocalGenerator(newSnapshot, this->LocalGenerator);
+  this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile());
   this->GetGlobalGenerator()->AddLocalGenerator(lg2);
 
   cmMakefile* subMf = lg2->GetMakefile();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef2771706a641607c146edc738f76e0205ed8577
commit ef2771706a641607c146edc738f76e0205ed8577
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 19:44:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:55 2015 +0200

    cmGeneratorTarget: Port internal type to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index b19856d..e914cf6 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -36,7 +36,7 @@
 
 //----------------------------------------------------------------------------
 void reportBadObjLib(std::vector<cmSourceFile*> const& badObjLib,
-                     cmTarget *target, cmake *cm)
+                     cmGeneratorTarget const* target, cmake *cm)
 {
   if(!badObjLib.empty())
     {
@@ -50,7 +50,7 @@ void reportBadObjLib(std::vector<cmSourceFile*> const& badObjLib,
     e << "but may contain only sources that compile, header files, and "
          "other files that would not affect linking of a normal library.";
     cm->IssueMessage(cmake::FATAL_ERROR, e.str(),
-                     target->GetBacktrace());
+                     target->Target->GetBacktrace());
     }
 }
 
@@ -133,14 +133,14 @@ struct TagVisitor
 {
   DataType& Data;
   std::vector<cmSourceFile*> BadObjLibFiles;
-  cmTarget *Target;
+  cmGeneratorTarget const* Target;
   cmGlobalGenerator *GlobalGenerator;
   cmsys::RegularExpression Header;
   bool IsObjLib;
 
-  TagVisitor(cmTarget *target, DataType& data)
+  TagVisitor(cmGeneratorTarget const* target, DataType& data)
     : Data(data), Target(target),
-    GlobalGenerator(target->GetMakefile()->GetGlobalGenerator()),
+    GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()),
     Header(CM_HEADER_REGEX),
     IsObjLib(target->GetType() == cmTarget::OBJECT_LIBRARY)
   {
@@ -362,7 +362,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget const* depTgt,
   { \
   std::vector<cmSourceFile*> sourceFiles; \
   this->Target->GetSourceFiles(sourceFiles, config); \
-  TagVisitor<DATA ## Tag DATATYPE> visitor(this->Target, data); \
+  TagVisitor<DATA ## Tag DATATYPE> visitor(this, data); \
   for(std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \
       si != sourceFiles.end(); ++si) \
     { \

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13b878b534dbfeb2995569f486e3b0684ef584aa
commit 13b878b534dbfeb2995569f486e3b0684ef584aa
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 19:42:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:54 2015 +0200

    cmGeneratorTarget: Prefer the local generator to access the global.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c831704..b19856d 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -234,7 +234,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
 {
   this->Makefile = this->Target->GetMakefile();
   this->LocalGenerator = lg;
-  this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
+  this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
 }
 
 cmGeneratorTarget::~cmGeneratorTarget()
@@ -1556,7 +1556,7 @@ cmTargetTraceDependencies
 {
   // Convenience.
   this->Makefile = this->Target->GetMakefile();
-  this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
+  this->GlobalGenerator = target->GetLocalGenerator()->GetGlobalGenerator();
   this->CurrentEntry = 0;
 
   // Queue all the source files already specified for the target.
@@ -1944,8 +1944,7 @@ void cmGeneratorTarget::GenerateTargetManifest(
     {
     return;
     }
-  cmMakefile* mf = this->Target->GetMakefile();
-  cmGlobalGenerator* gg = mf->GetGlobalGenerator();
+  cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
 
   // Get the names.
   std::string name;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ee3bd6f3e99be2dc1bf2b3111681838f0b8d268
commit 2ee3bd6f3e99be2dc1bf2b3111681838f0b8d268
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 19:40:19 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 00:33:32 2015 +0200

    cmGlobalVisualStudioGenerator: Simplify access to cmGeneratorTarget.

diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 2f9d79a..4ac259b 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -885,8 +885,7 @@ cmGlobalVisualStudioGenerator::OrderedTargetDependSet
   for (TargetSet::const_iterator it = targets.begin();
        it != targets.end(); ++it)
     {
-    cmGeneratorTarget* gt =
-        (*it)->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(*it);
+    cmGeneratorTarget* gt = this->GetGeneratorTarget(*it);
     this->insert(gt);
     }
 }

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

Summary of changes:
 Source/cmExportLibraryDependenciesCommand.cxx |    8 ++-
 Source/cmGeneratorTarget.cxx                  |   19 ++++---
 Source/cmGetDirectoryPropertyCommand.cxx      |    7 +--
 Source/cmGetPropertyCommand.cxx               |    9 +---
 Source/cmGlobalGenerator.cxx                  |   68 ++++++++++++++++---------
 Source/cmGlobalGenerator.h                    |    5 ++
 Source/cmGlobalVisualStudioGenerator.cxx      |    3 +-
 Source/cmMakefile.cxx                         |    1 +
 Source/cmQtAutoGenerators.cxx                 |    4 +-
 Source/cmSetPropertyCommand.cxx               |   10 +---
 Source/cmake.cxx                              |    2 +-
 11 files changed, 73 insertions(+), 63 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list