[Cmake-commits] CMake branch, next, updated. v3.3.1-2584-g698baec

Stephen Kelly steveire at gmail.com
Thu Aug 27 16:15:10 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  698baeca7519b75caa4958f187bc57e32da63aad (commit)
       via  7ccd4a7ceeeb5ec04c62cf5c2c6f7e31430bc254 (commit)
       via  66e7c747675286ca46ec0f0c84d0f64658ebea72 (commit)
       via  6a502f0a67f7fdd3fb0d830e020e5860fd2b956c (commit)
       via  ea832ddfa542fb8ba40c322d25ca084ecfb1747b (commit)
       via  641e0de381f80f39de9651d4a9def7726f26fbe5 (commit)
       via  f9f62d445a65a236b67ea05c3bde0e9e47966d81 (commit)
       via  15d1c4c8a99c226987884bc487fdd1c4608d6e85 (commit)
       via  53b616680069cde4f2c4d06cb31228a141bf92b8 (commit)
       via  a72a99b0d2474f09620e1a52a46e3ba74b1d99fa (commit)
       via  3b788d5d723bbc6c4e5849943f421e4c6aa509df (commit)
       via  2cdac1ac2011281e5fbba7b1641a729597cc0ba8 (commit)
       via  c2de8617cec667afe49da3f592964a25fe7b50e0 (commit)
       via  fa22a66e8f60e2ee4c5308e3a239a977dd54c70e (commit)
       via  5176697fa5333dadef7e5627ba187f557d77a8c2 (commit)
      from  05faeb9ad6d27696a5ba92af27f3bbcc8f90c5a1 (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=698baeca7519b75caa4958f187bc57e32da63aad
commit 698baeca7519b75caa4958f187bc57e32da63aad
Merge: 05faeb9 7ccd4a7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Aug 27 16:15:07 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 27 16:15:07 2015 -0400

    Merge topic 'generate-time-generators' into next
    
    7ccd4a7c cmGlobalGenerator: Create all local generators after Configure().
    66e7c747 cmGlobalGenerator: Create global targets directly after Configure.
    6a502f0a cmMakefile: Skip Global targets for CMP0019 evaluation.
    ea832ddf cmGlobalGenerator: Fill the project map at compute time.
    641e0de3 cmGlobalGenerator: Rename method.
    f9f62d44 cmGlobalGenerator: Avoid cmLocalGenerator until after Configure.
    15d1c4c8 cmLocalGenerator: Create from already-constructed cmMakefile.
    53b61668 Ninja: Remove some incorrect comments adding no value.
    a72a99b0 cmCTestScriptHandler: Simplify deletes.
    3b788d5d QtAutogen: Use a smart pointer.
    2cdac1ac cmGlobalGenerator: Remove MakeLocalGenerator method.
    c2de8617 cmGlobalGenerator: Require a snapshot to create a local generator.
    fa22a66e cmMakefile: Remove cmLocalGenerator member.
    5176697f cmLocalGenerator: Remove Parent pointer.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ccd4a7ceeeb5ec04c62cf5c2c6f7e31430bc254
commit 7ccd4a7ceeeb5ec04c62cf5c2c6f7e31430bc254
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:12:18 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:14:06 2015 +0200

    cmGlobalGenerator: Create all local generators after Configure().

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index b869312..cb272f3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1130,9 +1130,6 @@ void cmGlobalGenerator::Configure()
   cmMakefile* dirMf =
       new cmMakefile(this, this->GetCMakeInstance()->GetCurrentSnapshot());
   this->AddMakefile(dirMf);
-  cmLocalGenerator *lg = this->CreateLocalGenerator(dirMf);
-  this->Makefiles.push_back(lg->GetMakefile());
-  this->LocalGenerators.push_back(lg);
 
   // set the Start directories
   dirMf->SetCurrentSourceDirectory
@@ -1202,8 +1199,21 @@ void cmGlobalGenerator::Configure()
     }
 }
 
+void cmGlobalGenerator::CreateLocalGenerators()
+{
+  cmDeleteAll(this->LocalGenerators);
+  this->LocalGenerators.clear();
+  this->LocalGenerators.reserve(this->Makefiles.size());
+  for (std::vector<cmMakefile*>::const_iterator it = this->Makefiles.begin();
+       it != this->Makefiles.end(); ++it)
+    {
+    this->LocalGenerators.push_back(this->CreateLocalGenerator(*it));
+    }
+}
+
 void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)
 {
+  this->CreateLocalGenerators();
   cmDeleteAll(this->GeneratorTargets);
   this->GeneratorTargets.clear();
   this->CreateGeneratorTargets(targetTypes);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 9fc2d45..4461831 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -91,6 +91,7 @@ public:
     ImportedOnly
   };
 
+  void CreateLocalGenerators();
   void CreateGenerationObjects(TargetTypes targetTypes = AllTargets);
 
   /**
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 626d0bd..6480667 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1756,13 +1756,6 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
   cmMakefile* subMf = new cmMakefile(this->GlobalGenerator, newSnapshot);
   this->GetGlobalGenerator()->AddMakefile(subMf);
 
-  // create a new local generator and set its parent
-  cmLocalGenerator *lg2 = this->GetGlobalGenerator()
-        ->CreateLocalGenerator(subMf);
-  this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile());
-  this->GetGlobalGenerator()->AddLocalGenerator(lg2);
-
-
   // set the subdirs start dirs
   subMf->SetCurrentSourceDirectory(srcPath);
   subMf->SetCurrentBinaryDirectory(binPath);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66e7c747675286ca46ec0f0c84d0f64658ebea72
commit 66e7c747675286ca46ec0f0c84d0f64658ebea72
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:59:06 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:14:06 2015 +0200

    cmGlobalGenerator: Create global targets directly after Configure.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index e286a1f..b869312 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1147,6 +1147,22 @@ void cmGlobalGenerator::Configure()
   dirMf->Configure();
   dirMf->EnforceDirectoryLevelRules();
 
+  // Put a copy of each global target in every directory.
+  cmTargets globalTargets;
+  this->CreateDefaultGlobalTargets(&globalTargets);
+
+  for (unsigned int i = 0; i < this->Makefiles.size(); ++i)
+    {
+    cmMakefile* mf = this->Makefiles[i];
+    cmTargets* targets = &(mf->GetTargets());
+    cmTargets::iterator tit;
+    for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
+      {
+      (*targets)[tit->first] = tit->second;
+      (*targets)[tit->first].SetMakefile(mf);
+      }
+    }
+
   // update the cache entry for the number of local generators, this is used
   // for progress
   char num[100];
@@ -1184,25 +1200,6 @@ void cmGlobalGenerator::Configure()
       }
     this->CMakeInstance->UpdateProgress(msg.str().c_str(), -1);
     }
-
-  unsigned int i;
-
-  // Put a copy of each global target in every directory.
-  cmTargets globalTargets;
-  this->CreateDefaultGlobalTargets(&globalTargets);
-
-  for (i = 0; i < this->Makefiles.size(); ++i)
-    {
-    cmMakefile* mf = this->Makefiles[i];
-    cmTargets* targets = &(mf->GetTargets());
-    cmTargets::iterator tit;
-    for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
-      {
-      (*targets)[tit->first] = tit->second;
-      (*targets)[tit->first].SetMakefile(mf);
-      }
-    }
-
 }
 
 void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a502f0a67f7fdd3fb0d830e020e5860fd2b956c
commit 6a502f0a67f7fdd3fb0d830e020e5860fd2b956c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 13:25:53 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:14:06 2015 +0200

    cmMakefile: Skip Global targets for CMP0019 evaluation.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e28efc1..626d0bd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2336,7 +2336,8 @@ void cmMakefile::ExpandVariablesCMP0019()
        l != this->Targets.end(); ++l)
     {
     cmTarget &t = l->second;
-    if (t.GetType() == cmTarget::INTERFACE_LIBRARY)
+    if (t.GetType() == cmTarget::INTERFACE_LIBRARY
+        || t.GetType() == cmTarget::GLOBAL_TARGET)
       {
       continue;
       }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea832ddfa542fb8ba40c322d25ca084ecfb1747b
commit ea832ddfa542fb8ba40c322d25ca084ecfb1747b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:55:05 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:14:06 2015 +0200

    cmGlobalGenerator: Fill the project map at compute time.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index d1a945e..e286a1f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1159,10 +1159,6 @@ void cmGlobalGenerator::Configure()
   // and for infinite loops
   this->CheckTargetProperties();
 
-  // at this point this->LocalGenerators has been filled,
-  // so create the map from project name to vector of local generators
-  this->FillProjectMap();
-
   if ( this->CMakeInstance->GetWorkingMode() == cmake::NORMAL_MODE)
     {
     std::ostringstream msg;
@@ -1269,6 +1265,10 @@ bool cmGlobalGenerator::Compute()
 
   this->CreateGenerationObjects();
 
+  // at this point this->LocalGenerators has been filled,
+  // so create the map from project name to vector of local generators
+  this->FillProjectMap();
+
 #ifdef CMAKE_BUILD_WITH_CMAKE
   // Iterate through all targets and set up automoc for those which have
   // the AUTOMOC, AUTOUIC or AUTORCC property set

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=641e0de381f80f39de9651d4a9def7726f26fbe5
commit 641e0de381f80f39de9651d4a9def7726f26fbe5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:44:07 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:14:05 2015 +0200

    cmGlobalGenerator: Rename method.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index aa3b9c3..d1a945e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1157,7 +1157,7 @@ void cmGlobalGenerator::Configure()
 
   // check for link libraries and include directories containing "NOTFOUND"
   // and for infinite loops
-  this->CheckLocalGenerators();
+  this->CheckTargetProperties();
 
   // at this point this->LocalGenerators has been filled,
   // so create the map from project name to vector of local generators
@@ -1637,7 +1637,7 @@ void cmGlobalGenerator::ComputeTargetObjectDirectory(cmGeneratorTarget*) const
 {
 }
 
-void cmGlobalGenerator::CheckLocalGenerators()
+void cmGlobalGenerator::CheckTargetProperties()
 {
   std::map<std::string, std::string> notFoundMap;
 //  std::set<std::string> notFoundMap;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index b113488..9fc2d45 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -394,7 +394,7 @@ protected:
   // Fill the ProjectMap, this must be called after LocalGenerators
   // has been populated.
   void FillProjectMap();
-  void CheckLocalGenerators();
+  void CheckTargetProperties();
   bool IsExcluded(cmState::Snapshot const& root,
                   cmState::Snapshot const& snp) const;
   bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9f62d445a65a236b67ea05c3bde0e9e47966d81
commit f9f62d445a65a236b67ea05c3bde0e9e47966d81
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 12:08:49 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:14:05 2015 +0200

    cmGlobalGenerator: Avoid cmLocalGenerator until after Configure.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3b91f62..aa3b9c3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1135,17 +1135,17 @@ void cmGlobalGenerator::Configure()
   this->LocalGenerators.push_back(lg);
 
   // set the Start directories
-  lg->GetMakefile()->SetCurrentSourceDirectory
+  dirMf->SetCurrentSourceDirectory
     (this->CMakeInstance->GetHomeDirectory());
-  lg->GetMakefile()->SetCurrentBinaryDirectory
+  dirMf->SetCurrentBinaryDirectory
     (this->CMakeInstance->GetHomeOutputDirectory());
 
   this->BinaryDirectories.insert(
       this->CMakeInstance->GetHomeOutputDirectory());
 
   // now do it
-  lg->GetMakefile()->Configure();
-  lg->GetMakefile()->EnforceDirectoryLevelRules();
+  dirMf->Configure();
+  dirMf->EnforceDirectoryLevelRules();
 
   // update the cache entry for the number of local generators, this is used
   // for progress

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15d1c4c8a99c226987884bc487fdd1c4608d6e85
commit 15d1c4c8a99c226987884bc487fdd1c4608d6e85
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 11:41:51 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:14:03 2015 +0200

    cmLocalGenerator: Create from already-constructed cmMakefile.
    
    Don't manage the lifetime of the cmMakefile with cmLocalGenerator.

diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 8cbcd4e..92a4b2b 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -716,9 +716,10 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
         cm.AddCMakePaths();
         cm.SetProgressCallback(cmCPackGeneratorProgress, this);
         cmGlobalGenerator gg(&cm);
+        cmsys::auto_ptr<cmMakefile> mf(
+              new cmMakefile(&gg, cm.GetCurrentSnapshot()));
         cmsys::auto_ptr<cmLocalGenerator> lg(
-              gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
-        cmMakefile *mf = lg->GetMakefile();
+              gg.CreateLocalGenerator(mf.get()));
         std::string realInstallDirectory = tempInstallDirectory;
         if ( !installSubDirectory.empty() && installSubDirectory != "/" )
           {
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 96351f7..cb9cbc4 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -202,9 +202,10 @@ int main (int argc, char const* const* argv)
   cminst.SetHomeOutputDirectory("");
   cminst.GetState()->RemoveUnscriptableCommands();
   cmGlobalGenerator cmgg(&cminst);
+  cmsys::auto_ptr<cmMakefile> globalMF(
+        new cmMakefile(&cmgg, cminst.GetCurrentSnapshot()));
   cmsys::auto_ptr<cmLocalGenerator> cmlg(
-        cmgg.CreateLocalGenerator(cminst.GetCurrentSnapshot()));
-  cmMakefile* globalMF = cmlg->GetMakefile();
+        cmgg.CreateLocalGenerator(globalMF.get()));
 #if defined(__CYGWIN__)
   globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
 #endif
@@ -358,8 +359,8 @@ int main (int argc, char const* const* argv)
         ++it )
         {
         const char* gen = it->c_str();
-        cmMakefile::ScopePushPop raii(globalMF);
-        cmMakefile* mf = globalMF;
+        cmMakefile::ScopePushPop raii(globalMF.get());
+        cmMakefile* mf = globalMF.get();
         cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
           "Specified generator: " << gen << std::endl);
         if ( parsed && !mf->GetDefinition("CPACK_PACKAGE_NAME") )
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 7340d5c..fb0cce6 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -738,9 +738,9 @@ void cmCTestLaunch::LoadConfig()
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
+  cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
   cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
-  cmMakefile* mf = lg->GetMakefile();
+        gg.CreateLocalGenerator(mf.get()));
   std::string fname = this->LogDir;
   fname += "CTestLaunchConfig.cmake";
   if(cmSystemTools::FileExists(fname.c_str()) &&
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 4be5eb6..9154716 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -125,6 +125,7 @@ void cmCTestScriptHandler::Initialize()
   // what time in seconds did this script start running
   this->ScriptStartTime = 0;
 
+  delete this->Makefile;
   this->Makefile = 0;
 
   delete this->LocalGenerator;
@@ -139,8 +140,7 @@ void cmCTestScriptHandler::Initialize()
 //----------------------------------------------------------------------
 cmCTestScriptHandler::~cmCTestScriptHandler()
 {
-  // local generator owns the makefile
-  this->Makefile = 0;
+  delete this->Makefile;
   delete this->LocalGenerator;
   delete this->GlobalGenerator;
   delete this->CMake;
@@ -317,6 +317,7 @@ void cmCTestScriptHandler::CreateCMake()
     delete this->CMake;
     delete this->GlobalGenerator;
     delete this->LocalGenerator;
+    delete this->Makefile;
     }
   this->CMake = new cmake;
   this->CMake->SetHomeDirectory("");
@@ -325,7 +326,9 @@ void cmCTestScriptHandler::CreateCMake()
   this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
 
   cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
-  this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator(snapshot);
+  this->Makefile = new cmMakefile(this->GlobalGenerator, snapshot);
+  this->LocalGenerator =
+      this->GlobalGenerator->CreateLocalGenerator(this->Makefile);
   this->Makefile = this->LocalGenerator->GetMakefile();
 
   this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 9e00193..a523f57 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1592,9 +1592,9 @@ void cmCTestTestHandler::GetListOfTests()
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
+  cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
   cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
-  cmMakefile *mf = lg->GetMakefile();
+        gg.CreateLocalGenerator(mf.get()));
   mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
     this->CTest->GetConfigType().c_str());
 
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 1786c2c..adefd1c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -520,10 +520,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
-  cmMakefile *mf = lg->GetMakefile();
-  if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
+  cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
+  cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get()));
+  if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(),
+                                              mf.get()) )
     {
     cmCTestOptionalLog(this, DEBUG,
       "Cannot find custom configuration file tree" << std::endl, quiet);
diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx
index c31f952..40e8d29 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.cxx
+++ b/Source/cmGlobalBorlandMakefileGenerator.cxx
@@ -44,10 +44,10 @@ void cmGlobalBorlandMakefileGenerator
 
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
-    cmState::Snapshot snapshot)
+    cmMakefile *mf)
 {
   cmLocalUnixMakefileGenerator3* lg =
-      new cmLocalUnixMakefileGenerator3(this, snapshot);
+      new cmLocalUnixMakefileGenerator3(this, mf);
   lg->SetMakefileVariableSize(32);
   lg->SetMakeCommandEscapeTargetTwice(true);
   lg->SetBorlandMakeCurlyHack(true);
diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h
index 62e458f..b59c86d 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.h
+++ b/Source/cmGlobalBorlandMakefileGenerator.h
@@ -36,7 +36,7 @@ public:
   static void GetDocumentation(cmDocumentationEntry& entry);
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7de807b..3b91f62 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1127,8 +1127,10 @@ void cmGlobalGenerator::Configure()
   this->FirstTimeProgress = 0.0f;
   this->ClearGeneratorMembers();
 
-  // start with this directory
-  cmLocalGenerator *lg = this->CreateLocalGenerator();
+  cmMakefile* dirMf =
+      new cmMakefile(this, this->GetCMakeInstance()->GetCurrentSnapshot());
+  this->AddMakefile(dirMf);
+  cmLocalGenerator *lg = this->CreateLocalGenerator(dirMf);
   this->Makefiles.push_back(lg->GetMakefile());
   this->LocalGenerators.push_back(lg);
 
@@ -1600,6 +1602,7 @@ void cmGlobalGenerator::ClearGeneratorMembers()
   cmDeleteAll(this->BuildExportSets);
   this->BuildExportSets.clear();
 
+  cmDeleteAll(this->Makefiles);
   this->Makefiles.clear();
 
   cmDeleteAll(this->LocalGenerators);
@@ -1986,9 +1989,9 @@ void cmGlobalGenerator::EnableInstallTarget()
 }
 
 cmLocalGenerator*
-cmGlobalGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
+cmGlobalGenerator::CreateLocalGenerator(cmMakefile* mf)
 {
-  return new cmLocalGenerator(this, snapshot);
+  return new cmLocalGenerator(this, mf);
 }
 
 void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 91c1aac..b113488 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -57,7 +57,7 @@ public:
   virtual ~cmGlobalGenerator();
 
   virtual cmLocalGenerator*
-  CreateLocalGenerator(cmState::Snapshot snapshot = cmState::Snapshot());
+  CreateLocalGenerator(cmMakefile* mf);
 
   ///! Get the name for this generator
   virtual std::string GetName() const { return "Generic"; }
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 29abb37..6dde1e3 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -33,9 +33,9 @@ cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator()
 }
 
 cmLocalGenerator *
-cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
+cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmMakefile* mf)
 {
-  return new cmLocalGhsMultiGenerator(this, snapshot);
+  return new cmLocalGhsMultiGenerator(this, mf);
 }
 
 void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry &entry)
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index 873c20f..8f88d4f 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -31,7 +31,7 @@ public:
   { return new cmGlobalGeneratorSimpleFactory<cmGlobalGhsMultiGenerator>(); }
 
   ///! create the correct local generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
 
   /// @return the name of this generator.
   static std::string GetActualName() { return "Green Hills MULTI"; }
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 72ef4d6..120bb03 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -528,9 +528,9 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator(cmake* cm)
 // Virtual public methods.
 
 cmLocalGenerator*
-cmGlobalNinjaGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
+cmGlobalNinjaGenerator::CreateLocalGenerator(cmMakefile* mf)
 {
-  return new cmLocalNinjaGenerator(this, snapshot);
+  return new cmLocalNinjaGenerator(this, mf);
 }
 
 void cmGlobalNinjaGenerator
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index ecc8928..d204a50 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -167,7 +167,7 @@ public:
 
   virtual ~cmGlobalNinjaGenerator() { }
 
-  virtual cmLocalGenerator* CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf);
 
   virtual std::string GetName() const {
     return cmGlobalNinjaGenerator::GetActualName(); }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 0d4ee15..cf4fd69 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -60,9 +60,9 @@ void cmGlobalUnixMakefileGenerator3
 
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator* cmGlobalUnixMakefileGenerator3::CreateLocalGenerator(
-    cmState::Snapshot snapshot)
+    cmMakefile* mf)
 {
-  return new cmLocalUnixMakefileGenerator3(this, snapshot);
+  return new cmLocalUnixMakefileGenerator3(this, mf);
 }
 
 //----------------------------------------------------------------------------
@@ -577,17 +577,20 @@ void cmGlobalUnixMakefileGenerator3
                      makeOptions.begin(), makeOptions.end());
   if (!targetName.empty())
     {
+    cmMakefile* mf;
     cmLocalUnixMakefileGenerator3 *lg;
     if (!this->LocalGenerators.empty())
       {
       lg = static_cast<cmLocalUnixMakefileGenerator3 *>
         (this->LocalGenerators[0]);
+      mf = lg->GetMakefile();
       }
     else
       {
       cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
+      mf = new cmMakefile(this, snapshot);
       lg = static_cast<cmLocalUnixMakefileGenerator3 *>
-        (this->CreateLocalGenerator(snapshot));
+        (this->CreateLocalGenerator(mf));
       // set the Start directories
       lg->GetMakefile()->SetCurrentSourceDirectory
         (this->CMakeInstance->GetHomeDirectory());
@@ -606,6 +609,7 @@ void cmGlobalUnixMakefileGenerator3
     if (this->LocalGenerators.empty())
       {
       delete lg;
+      delete mf;
       }
     }
 }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 3ea6bb2..5f39c79 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -67,8 +67,7 @@ public:
   /** Get the documentation entry for this generator.  */
   static void GetDocumentation(cmDocumentationEntry& entry);
 
-  ///! Create a local generator appropriate to this Global Generator3
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index a36fed1..44d632d 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -307,9 +307,9 @@ void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout)
 
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator* cmGlobalVisualStudio10Generator::CreateLocalGenerator(
-    cmState::Snapshot snapshot)
+    cmMakefile* mf)
 {
-  return new cmLocalVisualStudio10Generator(this, snapshot);
+  return new cmLocalVisualStudio10Generator(this, mf);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index bbc22b9..8de7b09 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -48,7 +48,7 @@ public:
   virtual bool Compute();
 
   ///! create the correct local generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 48c3d32..df49948 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -173,10 +173,9 @@ cmGlobalVisualStudio6Generator::GenerateBuildCommand(
 
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator *
-cmGlobalVisualStudio6Generator::CreateLocalGenerator(
-                                                   cmState::Snapshot snapshot)
+cmGlobalVisualStudio6Generator::CreateLocalGenerator(cmMakefile* mf)
 {
-  return new cmLocalVisualStudio6Generator(this, snapshot);
+  return new cmLocalVisualStudio6Generator(this, mf);
 }
 
 
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index 0169be0..e9b24ea 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -39,7 +39,7 @@ public:
   static void GetDocumentation(cmDocumentationEntry& entry);
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index b8f6357..0175062 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -280,10 +280,10 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
 
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator(
-    cmState::Snapshot snapshot)
+    cmMakefile* mf)
 {
   cmLocalVisualStudio7Generator *lg =
-    new cmLocalVisualStudio7Generator(this, snapshot);
+    new cmLocalVisualStudio7Generator(this, mf);
   return lg;
 }
 
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 5ada2c5..35575d1 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -43,7 +43,7 @@ public:
   std::string const& GetPlatformName() const;
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
 
   virtual bool SetSystemName(std::string const& s, cmMakefile* mf);
 
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index af3629d..33babec 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -371,9 +371,9 @@ cmGlobalXCodeGenerator::GenerateBuildCommand(
 //----------------------------------------------------------------------------
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator *
-cmGlobalXCodeGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
+cmGlobalXCodeGenerator::CreateLocalGenerator(cmMakefile* mf)
 {
-  return new cmLocalXCodeGenerator(this, snapshot);
+  return new cmLocalXCodeGenerator(this, mf);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index f93f62f..102c036 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -41,7 +41,7 @@ public:
   static void GetDocumentation(cmDocumentationEntry& entry);
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile *mf);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 7da3085..2023697 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -68,9 +68,9 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator ggi(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(
-        ggi.CreateLocalGenerator(cm.GetCurrentSnapshot()));
-  cmMakefile *mf = lg->GetMakefile();
+  cmsys::auto_ptr<cmMakefile> mf(
+        new cmMakefile(&ggi, cm.GetCurrentSnapshot()));
+  cmsys::auto_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator(mf.get()));
 
   const char* inFileName = settingsFileName;
 
diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx
index 58c707c..5a18e2f 100644
--- a/Source/cmLocalCommonGenerator.cxx
+++ b/Source/cmLocalCommonGenerator.cxx
@@ -14,8 +14,8 @@
 #include "cmMakefile.h"
 
 cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg,
-                                               cmState::Snapshot snapshot):
-  cmLocalGenerator(gg, snapshot)
+                                               cmMakefile* mf):
+  cmLocalGenerator(gg, mf)
 {
 }
 
diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h
index b7caf0b..6b4b1cd 100644
--- a/Source/cmLocalCommonGenerator.h
+++ b/Source/cmLocalCommonGenerator.h
@@ -22,8 +22,7 @@ class cmCommonTargetGenerator;
 class cmLocalCommonGenerator: public cmLocalGenerator
 {
 public:
-  cmLocalCommonGenerator(cmGlobalGenerator* gg,
-                         cmState::Snapshot snapshot);
+  cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
   ~cmLocalCommonGenerator();
 
   std::string const& GetConfigName() { return this->ConfigName; }
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 357a508..455b698 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -43,13 +43,13 @@
 #endif
 
 cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
-                                   cmState::Snapshot snapshot)
-  : cmOutputConverter(snapshot), StateSnapshot(snapshot)
+                                   cmMakefile* makefile)
+  : cmOutputConverter(makefile->GetStateSnapshot()),
+    StateSnapshot(makefile->GetStateSnapshot())
 {
-  assert(snapshot.IsValid());
   this->GlobalGenerator = gg;
 
-  this->Makefile = new cmMakefile(gg, snapshot);
+  this->Makefile = makefile;
 
   this->EmitUniversalBinaryFlags = true;
   this->BackwardsCompatibility = 0;
@@ -58,7 +58,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
 
 cmLocalGenerator::~cmLocalGenerator()
 {
-  delete this->Makefile;
 }
 
 void cmLocalGenerator::IssueMessage(cmake::MessageType t,
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 4c0b1fe..28b5ed1 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -36,7 +36,7 @@ class cmCustomCommandGenerator;
 class cmLocalGenerator : public cmOutputConverter
 {
 public:
-  cmLocalGenerator(cmGlobalGenerator* gg, cmState::Snapshot snapshot);
+  cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile);
   virtual ~cmLocalGenerator();
 
   /**
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx
index 91dfeb4..bac989f 100644
--- a/Source/cmLocalGhsMultiGenerator.cxx
+++ b/Source/cmLocalGhsMultiGenerator.cxx
@@ -17,8 +17,8 @@
 #include "cmGeneratedFileStream.h"
 
 cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
-                                                   cmState::Snapshot snapshot)
-  : cmLocalGenerator(gg, snapshot)
+                                                   cmMakefile* mf)
+  : cmLocalGenerator(gg, mf)
 {
 }
 
diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h
index 3309bfd..b6a9a33 100644
--- a/Source/cmLocalGhsMultiGenerator.h
+++ b/Source/cmLocalGhsMultiGenerator.h
@@ -25,8 +25,7 @@ class cmGeneratedFileStream;
 class cmLocalGhsMultiGenerator : public cmLocalGenerator
 {
 public:
-  cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
-                           cmState::Snapshot snapshot);
+  cmLocalGhsMultiGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
 
   virtual ~cmLocalGhsMultiGenerator();
 
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 62bf8b2..7525bf2 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -23,8 +23,8 @@
 #include <assert.h>
 
 cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
-                                             cmState::Snapshot snapshot)
-  : cmLocalCommonGenerator(gg, snapshot)
+                                             cmMakefile* mf)
+  : cmLocalCommonGenerator(gg, mf)
   , HomeRelativeOutputPath("")
 {
   this->TargetImplib = "$TARGET_IMPLIB";
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index 4c158bc..8d3d49c 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -31,8 +31,7 @@ class cmake;
 class cmLocalNinjaGenerator : public cmLocalCommonGenerator
 {
 public:
-  cmLocalNinjaGenerator(cmGlobalGenerator* gg,
-                        cmState::Snapshot snapshot);
+  cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
 
   virtual ~cmLocalNinjaGenerator();
 
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index d2b60d3..b131a63 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -80,9 +80,8 @@ static std::string cmSplitExtension(std::string const& in, std::string& base)
 
 //----------------------------------------------------------------------------
 cmLocalUnixMakefileGenerator3::
-cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg,
-                              cmState::Snapshot snapshot)
-  : cmLocalCommonGenerator(gg, snapshot)
+cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmMakefile* mf)
+  : cmLocalCommonGenerator(gg, mf)
 {
   this->MakefileVariableSize = 0;
   this->ColorMakefile = false;
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 2b9af38..98f15e6 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -34,8 +34,7 @@ class cmSourceFile;
 class cmLocalUnixMakefileGenerator3 : public cmLocalCommonGenerator
 {
 public:
-  cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg,
-                                cmState::Snapshot snapshot);
+  cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmMakefile* mf);
   virtual ~cmLocalUnixMakefileGenerator3();
 
   virtual void ComputeHomeRelativeOutputPath();
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 25b3f19..b043b00 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -62,9 +62,8 @@ class cmVS10XMLParser : public cmXMLParser
 
 //----------------------------------------------------------------------------
 cmLocalVisualStudio10Generator
-::cmLocalVisualStudio10Generator(cmGlobalGenerator* gg,
-                                 cmState::Snapshot snapshot):
-  cmLocalVisualStudio7Generator(gg, snapshot)
+::cmLocalVisualStudio10Generator(cmGlobalGenerator* gg, cmMakefile* mf):
+  cmLocalVisualStudio7Generator(gg, mf)
 {
 }
 
diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h
index 0f179fd..e187590 100644
--- a/Source/cmLocalVisualStudio10Generator.h
+++ b/Source/cmLocalVisualStudio10Generator.h
@@ -25,8 +25,7 @@ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator
 {
 public:
   ///! Set cache only and recurse to false by default.
-  cmLocalVisualStudio10Generator(cmGlobalGenerator* gg,
-                                 cmState::Snapshot snapshot);
+  cmLocalVisualStudio10Generator(cmGlobalGenerator* gg, cmMakefile* mf);
 
   virtual ~cmLocalVisualStudio10Generator();
 
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 46e1987..cc94cd4 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -24,9 +24,8 @@
 #include <cmsys/FStream.hxx>
 
 cmLocalVisualStudio6Generator
-::cmLocalVisualStudio6Generator(cmGlobalGenerator* gg,
-                                cmState::Snapshot snapshot):
-  cmLocalVisualStudioGenerator(gg, snapshot)
+::cmLocalVisualStudio6Generator(cmGlobalGenerator* gg, cmMakefile* mf):
+  cmLocalVisualStudioGenerator(gg, mf)
 {
 }
 
diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h
index 86b4906..828d252 100644
--- a/Source/cmLocalVisualStudio6Generator.h
+++ b/Source/cmLocalVisualStudio6Generator.h
@@ -29,8 +29,7 @@ class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator
 {
 public:
   ///! Set cache only and recurse to false by default.
-  cmLocalVisualStudio6Generator(cmGlobalGenerator* gg,
-                                cmState::Snapshot snapshot);
+  cmLocalVisualStudio6Generator(cmGlobalGenerator* gg, cmMakefile* mf);
 
   virtual ~cmLocalVisualStudio6Generator();
 
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index eebed7e..cf67251 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -53,9 +53,8 @@ static void cmConvertToWindowsSlash(std::string& s)
 
 //----------------------------------------------------------------------------
 cmLocalVisualStudio7Generator
-::cmLocalVisualStudio7Generator(cmGlobalGenerator* gg,
-                                cmState::Snapshot snapshot):
-  cmLocalVisualStudioGenerator(gg, snapshot)
+::cmLocalVisualStudio7Generator(cmGlobalGenerator* gg, cmMakefile* mf):
+  cmLocalVisualStudioGenerator(gg, mf)
 {
   this->Internal = new cmLocalVisualStudio7GeneratorInternals(this);
 }
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index 42ae097..bc05a06 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -35,8 +35,7 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator
 {
 public:
   ///! Set cache only and recurse to false by default.
-  cmLocalVisualStudio7Generator(cmGlobalGenerator* gg,
-                                cmState::Snapshot snapshot);
+  cmLocalVisualStudio7Generator(cmGlobalGenerator* gg, cmMakefile* mf);
 
   virtual ~cmLocalVisualStudio7Generator();
 
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 70f729f..c0072de 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -19,9 +19,8 @@
 
 //----------------------------------------------------------------------------
 cmLocalVisualStudioGenerator
-::cmLocalVisualStudioGenerator(cmGlobalGenerator* gg,
-                               cmState::Snapshot snapshot)
-  : cmLocalGenerator(gg, snapshot)
+::cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf)
+  : cmLocalGenerator(gg, mf)
 {
 }
 
diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h
index 32244c7..071bfb3 100644
--- a/Source/cmLocalVisualStudioGenerator.h
+++ b/Source/cmLocalVisualStudioGenerator.h
@@ -31,8 +31,7 @@ class cmCustomCommandGenerator;
 class cmLocalVisualStudioGenerator : public cmLocalGenerator
 {
 public:
-  cmLocalVisualStudioGenerator(cmGlobalGenerator* gg,
-                               cmState::Snapshot snapshot);
+  cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
   virtual ~cmLocalVisualStudioGenerator();
 
   /** Construct a script from the given list of command lines.  */
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index d6576f6..b19112d 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -16,8 +16,8 @@
 
 //----------------------------------------------------------------------------
 cmLocalXCodeGenerator::cmLocalXCodeGenerator(cmGlobalGenerator* gg,
-                                             cmState::Snapshot snapshot)
-  : cmLocalGenerator(gg, snapshot)
+                                             cmMakefile* mf)
+  : cmLocalGenerator(gg, mf)
 {
   // the global generator does this, so do not
   // put these flags into the language flags
diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h
index d96e78c..6d0926f 100644
--- a/Source/cmLocalXCodeGenerator.h
+++ b/Source/cmLocalXCodeGenerator.h
@@ -25,7 +25,7 @@ class cmLocalXCodeGenerator : public cmLocalGenerator
 public:
   ///! Set cache only and recurse to false by default.
   cmLocalXCodeGenerator(cmGlobalGenerator* gg,
-                        cmState::Snapshot snapshot);
+                        cmMakefile* mf);
 
   virtual ~cmLocalXCodeGenerator();
   virtual std::string GetTargetDirectory(cmTarget const& target) const;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 1df6213..e28efc1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -16,7 +16,6 @@
 #include "cmSourceFileLocation.h"
 #include "cmSystemTools.h"
 #include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
 #include "cmCommands.h"
 #include "cmState.h"
 #include "cmOutputConverter.h"
@@ -1754,13 +1753,15 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
                                            this->ContextStack.back()->Name,
                                            this->ContextStack.back()->Line);
 
+  cmMakefile* subMf = new cmMakefile(this->GlobalGenerator, newSnapshot);
+  this->GetGlobalGenerator()->AddMakefile(subMf);
+
   // create a new local generator and set its parent
   cmLocalGenerator *lg2 = this->GetGlobalGenerator()
-        ->CreateLocalGenerator(newSnapshot);
+        ->CreateLocalGenerator(subMf);
   this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile());
   this->GetGlobalGenerator()->AddLocalGenerator(lg2);
 
-  cmMakefile* subMf = lg2->GetMakefile();
 
   // set the subdirs start dirs
   subMf->SetCurrentSourceDirectory(srcPath);
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 278f220..becfeba 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1218,7 +1218,8 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
   cmGlobalGenerator gg(&cm);
 
   cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
-  cmsys::auto_ptr<cmLocalGenerator> lg = gg.CreateLocalGenerator(snapshot);
+  cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, snapshot));
+  cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get()));
   lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
   lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
   gg.SetCurrentMakefile(lg->GetMakefile());
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ebc38d8..f069481 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -430,7 +430,8 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
     this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
     this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
     cmState::Snapshot snapshot = this->GetCurrentSnapshot();
-    cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(snapshot));
+    cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot));
+    cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get()));
     lg->GetMakefile()->SetCurrentBinaryDirectory
       (cmSystemTools::GetCurrentWorkingDirectory());
     lg->GetMakefile()->SetCurrentSourceDirectory
@@ -472,8 +473,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
 
   cmState::Snapshot snapshot = this->GetCurrentSnapshot();
   // read in the list file to fill the cache
-  cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(snapshot));
-  cmMakefile* mf = lg->GetMakefile();
+  cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot));
+  cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get()));
   mf->SetCurrentBinaryDirectory
     (cmSystemTools::GetCurrentWorkingDirectory());
   mf->SetCurrentSourceDirectory
@@ -2061,9 +2062,8 @@ int cmake::CheckBuildSystem()
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
-  cmMakefile* mf = lg->GetMakefile();
+  cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
+  cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get()));
   if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) ||
      cmSystemTools::GetErrorOccuredFlag())
     {
@@ -2092,9 +2092,11 @@ int cmake::CheckBuildSystem()
       ggd(this->CreateGlobalGenerator(genName));
     if(ggd.get())
       {
+      cmsys::auto_ptr<cmMakefile> mfd(new cmMakefile(ggd.get(),
+                                                    cm.GetCurrentSnapshot()));
       cmsys::auto_ptr<cmLocalGenerator> lgd(
-            ggd->CreateLocalGenerator(cm.GetCurrentSnapshot()));
-      lgd->ClearDependencies(mf, verbose);
+            ggd->CreateLocalGenerator(mfd.get()));
+      lgd->ClearDependencies(mfd.get(), verbose);
       }
     }
 
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index c788474..aa70aa0 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -769,8 +769,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
         {
         cm.SetGlobalGenerator(ggd);
         cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
+        cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(ggd, snapshot));
         cmsys::auto_ptr<cmLocalGenerator> lgd(
-              ggd->CreateLocalGenerator(snapshot));
+              ggd->CreateLocalGenerator(mf.get()));
         lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
         lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53b616680069cde4f2c4d06cb31228a141bf92b8
commit 53b616680069cde4f2c4d06cb31228a141bf92b8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Aug 27 22:13:34 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 22:13:34 2015 +0200

    Ninja: Remove some incorrect comments adding no value.

diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 418d6f7..ecc8928 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -162,32 +162,24 @@ public:
 public:
   cmGlobalNinjaGenerator(cmake* cm);
 
-  /// Convenience method for creating an instance of this class.
   static cmGlobalGeneratorFactory* NewFactory() {
     return new cmGlobalGeneratorSimpleFactory<cmGlobalNinjaGenerator>(); }
 
-  /// Destructor.
   virtual ~cmGlobalNinjaGenerator() { }
 
-  /// Overloaded methods. @see cmGlobalGenerator::CreateLocalGenerator()
   virtual cmLocalGenerator* CreateLocalGenerator(cmState::Snapshot snapshot);
 
-  /// Overloaded methods. @see cmGlobalGenerator::GetName().
   virtual std::string GetName() const {
     return cmGlobalNinjaGenerator::GetActualName(); }
 
-  /// @return the name of this generator.
   static std::string GetActualName() { return "Ninja"; }
 
-  /// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
   static void GetDocumentation(cmDocumentationEntry& entry);
 
-  /// Overloaded methods. @see cmGlobalGenerator::EnableLanguage()
   virtual void EnableLanguage(std::vector<std::string>const& languages,
                               cmMakefile* mf,
                               bool optional);
 
-  /// Overloaded methods. @see cmGlobalGenerator::GenerateBuildCommand()
   virtual void GenerateBuildCommand(
     std::vector<std::string>& makeCommand,
     const std::string& makeProgram,
@@ -306,11 +298,8 @@ public:
 
 protected:
 
-  /// Overloaded methods. @see cmGlobalGenerator::Generate()
   virtual void Generate();
 
-  /// Overloaded methods.
-  /// @see cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS()
   virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const { return true; }
 
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a72a99b0d2474f09620e1a52a46e3ba74b1d99fa
commit a72a99b0d2474f09620e1a52a46e3ba74b1d99fa
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Aug 24 23:00:21 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 21:39:18 2015 +0200

    cmCTestScriptHandler: Simplify deletes.
    
    Deleting a nullptr is fine.

diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 8327f29..4be5eb6 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -126,20 +126,14 @@ void cmCTestScriptHandler::Initialize()
   this->ScriptStartTime = 0;
 
   this->Makefile = 0;
-  if (this->LocalGenerator)
-    {
-    delete this->LocalGenerator;
-    }
+
+  delete this->LocalGenerator;
   this->LocalGenerator = 0;
-  if (this->GlobalGenerator)
-    {
-    delete this->GlobalGenerator;
-    }
+
+  delete this->GlobalGenerator;
   this->GlobalGenerator = 0;
-  if (this->CMake)
-    {
-    delete this->CMake;
-    }
+
+  delete this->CMake;
 }
 
 //----------------------------------------------------------------------
@@ -147,20 +141,9 @@ cmCTestScriptHandler::~cmCTestScriptHandler()
 {
   // local generator owns the makefile
   this->Makefile = 0;
-  if (this->LocalGenerator)
-    {
-    delete this->LocalGenerator;
-    }
-  this->LocalGenerator = 0;
-  if (this->GlobalGenerator)
-    {
-    delete this->GlobalGenerator;
-    }
-  this->GlobalGenerator = 0;
-  if (this->CMake)
-    {
-    delete this->CMake;
-    }
+  delete this->LocalGenerator;
+  delete this->GlobalGenerator;
+  delete this->CMake;
 }
 
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b788d5d723bbc6c4e5849943f421e4c6aa509df
commit 3b788d5d723bbc6c4e5849943f421e4c6aa509df
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 11:41:48 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 21:39:18 2015 +0200

    QtAutogen: Use a smart pointer.

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 9cb005c..278f220 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1218,7 +1218,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
   cmGlobalGenerator gg(&cm);
 
   cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
-  cmLocalGenerator* lg = gg.CreateLocalGenerator(snapshot);
+  cmsys::auto_ptr<cmLocalGenerator> lg = gg.CreateLocalGenerator(snapshot);
   lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
   lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
   gg.SetCurrentMakefile(lg->GetMakefile());
@@ -1235,7 +1235,6 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
 
   this->WriteOldMocDefinitionsFile(targetDirectory);
 
-  delete lg;
   return success;
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cdac1ac2011281e5fbba7b1641a729597cc0ba8
commit 2cdac1ac2011281e5fbba7b1641a729597cc0ba8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 11:30:12 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 21:39:18 2015 +0200

    cmGlobalGenerator: Remove MakeLocalGenerator method.
    
    Inline implementation to callers.

diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 68509a5..8cbcd4e 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -717,7 +717,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
         cm.SetProgressCallback(cmCPackGeneratorProgress, this);
         cmGlobalGenerator gg(&cm);
         cmsys::auto_ptr<cmLocalGenerator> lg(
-              gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
+              gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
         cmMakefile *mf = lg->GetMakefile();
         std::string realInstallDirectory = tempInstallDirectory;
         if ( !installSubDirectory.empty() && installSubDirectory != "/" )
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 0c53d1b..96351f7 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -203,7 +203,7 @@ int main (int argc, char const* const* argv)
   cminst.GetState()->RemoveUnscriptableCommands();
   cmGlobalGenerator cmgg(&cminst);
   cmsys::auto_ptr<cmLocalGenerator> cmlg(
-        cmgg.MakeLocalGenerator(cminst.GetCurrentSnapshot()));
+        cmgg.CreateLocalGenerator(cminst.GetCurrentSnapshot()));
   cmMakefile* globalMF = cmlg->GetMakefile();
 #if defined(__CYGWIN__)
   globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index d978568..7340d5c 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -739,7 +739,7 @@ void cmCTestLaunch::LoadConfig()
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
   cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
+        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile* mf = lg->GetMakefile();
   std::string fname = this->LogDir;
   fname += "CTestLaunchConfig.cmake";
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index c791302..8327f29 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -342,7 +342,7 @@ void cmCTestScriptHandler::CreateCMake()
   this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
 
   cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
-  this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator(snapshot);
+  this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator(snapshot);
   this->Makefile = this->LocalGenerator->GetMakefile();
 
   this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 3262efd..9e00193 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1593,7 +1593,7 @@ void cmCTestTestHandler::GetListOfTests()
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
   cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
+        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile *mf = lg->GetMakefile();
   mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
     this->CTest->GetConfigType().c_str());
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index f020f9e..1786c2c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -521,7 +521,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
   cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
+        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile *mf = lg->GetMakefile();
   if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
     {
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index efb119a..7de807b 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1128,7 +1128,7 @@ void cmGlobalGenerator::Configure()
   this->ClearGeneratorMembers();
 
   // start with this directory
-  cmLocalGenerator *lg = this->MakeLocalGenerator();
+  cmLocalGenerator *lg = this->CreateLocalGenerator();
   this->Makefiles.push_back(lg->GetMakefile());
   this->LocalGenerators.push_back(lg);
 
@@ -1985,12 +1985,6 @@ void cmGlobalGenerator::EnableInstallTarget()
   this->InstallTargetEnabled = true;
 }
 
-cmLocalGenerator *
-cmGlobalGenerator::MakeLocalGenerator(cmState::Snapshot snapshot)
-{
-  return this->CreateLocalGenerator(snapshot);
-}
-
 cmLocalGenerator*
 cmGlobalGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
 {
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 2e0f7b5..91c1aac 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -56,8 +56,8 @@ public:
   cmGlobalGenerator(cmake* cm);
   virtual ~cmGlobalGenerator();
 
-  cmLocalGenerator*
-  MakeLocalGenerator(cmState::Snapshot snapshot = cmState::Snapshot());
+  virtual cmLocalGenerator*
+  CreateLocalGenerator(cmState::Snapshot snapshot = cmState::Snapshot());
 
   ///! Get the name for this generator
   virtual std::string GetName() const { return "Generic"; }
@@ -440,9 +440,6 @@ protected:
   virtual bool UseFolderProperty();
 
 private:
-  ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
-
   cmMakefile* TryCompileOuterMakefile;
   // If you add a new map here, make sure it is copied
   // in EnableLanguagesFromGenerator
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index c396af4..0d4ee15 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -587,7 +587,7 @@ void cmGlobalUnixMakefileGenerator3
       {
       cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
       lg = static_cast<cmLocalUnixMakefileGenerator3 *>
-        (this->MakeLocalGenerator(snapshot));
+        (this->CreateLocalGenerator(snapshot));
       // set the Start directories
       lg->GetMakefile()->SetCurrentSourceDirectory
         (this->CMakeInstance->GetHomeDirectory());
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 797b198..7da3085 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -69,7 +69,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator ggi(&cm);
   cmsys::auto_ptr<cmLocalGenerator> lg(
-        ggi.MakeLocalGenerator(cm.GetCurrentSnapshot()));
+        ggi.CreateLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile *mf = lg->GetMakefile();
 
   const char* inFileName = settingsFileName;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 10ce0b3..1df6213 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1756,7 +1756,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
 
   // create a new local generator and set its parent
   cmLocalGenerator *lg2 = this->GetGlobalGenerator()
-        ->MakeLocalGenerator(newSnapshot);
+        ->CreateLocalGenerator(newSnapshot);
   this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile());
   this->GetGlobalGenerator()->AddLocalGenerator(lg2);
 
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index c6c045a..9cb005c 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1218,7 +1218,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
   cmGlobalGenerator gg(&cm);
 
   cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
-  cmLocalGenerator* lg = gg.MakeLocalGenerator(snapshot);
+  cmLocalGenerator* lg = gg.CreateLocalGenerator(snapshot);
   lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
   lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
   gg.SetCurrentMakefile(lg->GetMakefile());
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 29271b8..ebc38d8 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -430,7 +430,7 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
     this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
     this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
     cmState::Snapshot snapshot = this->GetCurrentSnapshot();
-    cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator(snapshot));
+    cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(snapshot));
     lg->GetMakefile()->SetCurrentBinaryDirectory
       (cmSystemTools::GetCurrentWorkingDirectory());
     lg->GetMakefile()->SetCurrentSourceDirectory
@@ -472,7 +472,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
 
   cmState::Snapshot snapshot = this->GetCurrentSnapshot();
   // read in the list file to fill the cache
-  cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator(snapshot));
+  cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(snapshot));
   cmMakefile* mf = lg->GetMakefile();
   mf->SetCurrentBinaryDirectory
     (cmSystemTools::GetCurrentWorkingDirectory());
@@ -2062,7 +2062,7 @@ int cmake::CheckBuildSystem()
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
   cmsys::auto_ptr<cmLocalGenerator> lg(
-        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
+        gg.CreateLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile* mf = lg->GetMakefile();
   if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) ||
      cmSystemTools::GetErrorOccuredFlag())
@@ -2093,7 +2093,7 @@ int cmake::CheckBuildSystem()
     if(ggd.get())
       {
       cmsys::auto_ptr<cmLocalGenerator> lgd(
-            ggd->MakeLocalGenerator(cm.GetCurrentSnapshot()));
+            ggd->CreateLocalGenerator(cm.GetCurrentSnapshot()));
       lgd->ClearDependencies(mf, verbose);
       }
     }
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 868dbe3..c788474 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -770,7 +770,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
         cm.SetGlobalGenerator(ggd);
         cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
         cmsys::auto_ptr<cmLocalGenerator> lgd(
-              ggd->MakeLocalGenerator(snapshot));
+              ggd->CreateLocalGenerator(snapshot));
         lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
         lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2de8617cec667afe49da3f592964a25fe7b50e0
commit c2de8617cec667afe49da3f592964a25fe7b50e0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 31 01:43:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 21:39:18 2015 +0200

    cmGlobalGenerator: Require a snapshot to create a local generator.

diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index bf4df60..68509a5 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -716,7 +716,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
         cm.AddCMakePaths();
         cm.SetProgressCallback(cmCPackGeneratorProgress, this);
         cmGlobalGenerator gg(&cm);
-        cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
+        cmsys::auto_ptr<cmLocalGenerator> lg(
+              gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
         cmMakefile *mf = lg->GetMakefile();
         std::string realInstallDirectory = tempInstallDirectory;
         if ( !installSubDirectory.empty() && installSubDirectory != "/" )
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index c2fe763..0c53d1b 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -202,7 +202,8 @@ int main (int argc, char const* const* argv)
   cminst.SetHomeOutputDirectory("");
   cminst.GetState()->RemoveUnscriptableCommands();
   cmGlobalGenerator cmgg(&cminst);
-  cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.MakeLocalGenerator());
+  cmsys::auto_ptr<cmLocalGenerator> cmlg(
+        cmgg.MakeLocalGenerator(cminst.GetCurrentSnapshot()));
   cmMakefile* globalMF = cmlg->GetMakefile();
 #if defined(__CYGWIN__)
   globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 0f588c5..d978568 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -738,7 +738,8 @@ void cmCTestLaunch::LoadConfig()
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
+  cmsys::auto_ptr<cmLocalGenerator> lg(
+        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile* mf = lg->GetMakefile();
   std::string fname = this->LogDir;
   fname += "CTestLaunchConfig.cmake";
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 047bd98..c791302 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -341,7 +341,8 @@ void cmCTestScriptHandler::CreateCMake()
   this->CMake->AddCMakePaths();
   this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
 
-  this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator();
+  cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
+  this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator(snapshot);
   this->Makefile = this->LocalGenerator->GetMakefile();
 
   this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index c8a0d27..3262efd 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1592,7 +1592,8 @@ void cmCTestTestHandler::GetListOfTests()
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
+  cmsys::auto_ptr<cmLocalGenerator> lg(
+        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile *mf = lg->GetMakefile();
   mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
     this->CTest->GetConfigType().c_str());
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index b976469..f020f9e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -520,7 +520,8 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
+  cmsys::auto_ptr<cmLocalGenerator> lg(
+        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile *mf = lg->GetMakefile();
   if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
     {
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 01f50ed..efb119a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1988,11 +1988,6 @@ void cmGlobalGenerator::EnableInstallTarget()
 cmLocalGenerator *
 cmGlobalGenerator::MakeLocalGenerator(cmState::Snapshot snapshot)
 {
-  if (!snapshot.IsValid())
-    {
-    snapshot = this->CMakeInstance->GetCurrentSnapshot();
-    }
-
   return this->CreateLocalGenerator(snapshot);
 }
 
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 0f491aa..c396af4 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -585,8 +585,9 @@ void cmGlobalUnixMakefileGenerator3
       }
     else
       {
+      cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
       lg = static_cast<cmLocalUnixMakefileGenerator3 *>
-        (this->MakeLocalGenerator());
+        (this->MakeLocalGenerator(snapshot));
       // set the Start directories
       lg->GetMakefile()->SetCurrentSourceDirectory
         (this->CMakeInstance->GetHomeDirectory());
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index fa29b4f..797b198 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -68,7 +68,8 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator ggi(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(ggi.MakeLocalGenerator());
+  cmsys::auto_ptr<cmLocalGenerator> lg(
+        ggi.MakeLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile *mf = lg->GetMakefile();
 
   const char* inFileName = settingsFileName;
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 0a4b546..c6c045a 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1217,7 +1217,8 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
   cm.SetHomeDirectory(targetDirectory);
   cmGlobalGenerator gg(&cm);
 
-  cmLocalGenerator* lg = gg.MakeLocalGenerator();
+  cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
+  cmLocalGenerator* lg = gg.MakeLocalGenerator(snapshot);
   lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
   lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
   gg.SetCurrentMakefile(lg->GetMakefile());
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 1f5c4d4..29271b8 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -429,7 +429,8 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
     std::string homeOutputDir = this->GetHomeOutputDirectory();
     this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
     this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
-    cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator());
+    cmState::Snapshot snapshot = this->GetCurrentSnapshot();
+    cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator(snapshot));
     lg->GetMakefile()->SetCurrentBinaryDirectory
       (cmSystemTools::GetCurrentWorkingDirectory());
     lg->GetMakefile()->SetCurrentSourceDirectory
@@ -469,8 +470,9 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
   cmGlobalGenerator *gg = new cmGlobalGenerator(this);
   this->SetGlobalGenerator(gg);
 
+  cmState::Snapshot snapshot = this->GetCurrentSnapshot();
   // read in the list file to fill the cache
-  cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator());
+  cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator(snapshot));
   cmMakefile* mf = lg->GetMakefile();
   mf->SetCurrentBinaryDirectory
     (cmSystemTools::GetCurrentWorkingDirectory());
@@ -2059,7 +2061,8 @@ int cmake::CheckBuildSystem()
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmGlobalGenerator gg(&cm);
-  cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
+  cmsys::auto_ptr<cmLocalGenerator> lg(
+        gg.MakeLocalGenerator(cm.GetCurrentSnapshot()));
   cmMakefile* mf = lg->GetMakefile();
   if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) ||
      cmSystemTools::GetErrorOccuredFlag())
@@ -2089,7 +2092,8 @@ int cmake::CheckBuildSystem()
       ggd(this->CreateGlobalGenerator(genName));
     if(ggd.get())
       {
-      cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator());
+      cmsys::auto_ptr<cmLocalGenerator> lgd(
+            ggd->MakeLocalGenerator(cm.GetCurrentSnapshot()));
       lgd->ClearDependencies(mf, verbose);
       }
     }
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 7bee0ea..868dbe3 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -768,7 +768,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
       if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen))
         {
         cm.SetGlobalGenerator(ggd);
-        cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator());
+        cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
+        cmsys::auto_ptr<cmLocalGenerator> lgd(
+              ggd->MakeLocalGenerator(snapshot));
         lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
         lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa22a66e8f60e2ee4c5308e3a239a977dd54c70e
commit fa22a66e8f60e2ee4c5308e3a239a977dd54c70e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 11:20:28 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 21:39:18 2015 +0200

    cmMakefile: Remove cmLocalGenerator member.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index aea14d5..357a508 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -49,7 +49,7 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
   assert(snapshot.IsValid());
   this->GlobalGenerator = gg;
 
-  this->Makefile = new cmMakefile(this);
+  this->Makefile = new cmMakefile(gg, snapshot);
 
   this->EmitUniversalBinaryFlags = true;
   this->BackwardsCompatibility = 0;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 2ba12a4..10ce0b3 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -44,9 +44,10 @@
 #include <assert.h>
 
 // default is not to be building executables
-cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
-  : LocalGenerator(localGenerator),
-    StateSnapshot(localGenerator->GetStateSnapshot())
+cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
+                       cmState::Snapshot const& snapshot)
+  : GlobalGenerator(globalGenerator),
+    StateSnapshot(snapshot)
 {
   this->IsSourceFileTryCompile = false;
 
@@ -3744,12 +3745,12 @@ bool cmMakefile::GetIsSourceFileTryCompile() const
 
 cmake *cmMakefile::GetCMakeInstance() const
 {
-  return this->GetGlobalGenerator()->GetCMakeInstance();
+  return this->GlobalGenerator->GetCMakeInstance();
 }
 
 cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const
 {
-  return this->LocalGenerator->GetGlobalGenerator();
+  return this->GlobalGenerator;
 }
 
 #ifdef CMAKE_BUILD_WITH_CMAKE
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index f3839aa..3cf20a6 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -42,7 +42,6 @@
 class cmFunctionBlocker;
 class cmCommand;
 class cmInstallGenerator;
-class cmLocalGenerator;
 class cmMakeDepend;
 class cmSourceFile;
 class cmTest;
@@ -71,7 +70,8 @@ public:
   /**
    * Construct an empty makefile.
    */
-  cmMakefile(cmLocalGenerator* localGenerator);
+  cmMakefile(cmGlobalGenerator* globalGenerator,
+             const cmState::Snapshot& snapshot);
 
   /**
    * Destructor.
@@ -856,7 +856,7 @@ protected:
 #endif
 
   std::vector<cmCommand*> FinalPassCommands;
-  cmLocalGenerator* LocalGenerator;
+  cmGlobalGenerator* GlobalGenerator;
   bool IsFunctionBlocked(const cmListFileFunction& lff,
                          cmExecutionStatus &status);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5176697fa5333dadef7e5627ba187f557d77a8c2
commit 5176697fa5333dadef7e5627ba187f557d77a8c2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 11:08:49 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Aug 27 21:39:18 2015 +0200

    cmLocalGenerator: Remove Parent pointer.

diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx
index 87665a0..c31f952 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.cxx
+++ b/Source/cmGlobalBorlandMakefileGenerator.cxx
@@ -44,10 +44,10 @@ void cmGlobalBorlandMakefileGenerator
 
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
-    cmLocalGenerator* parent, cmState::Snapshot snapshot)
+    cmState::Snapshot snapshot)
 {
   cmLocalUnixMakefileGenerator3* lg =
-      new cmLocalUnixMakefileGenerator3(this, parent, snapshot);
+      new cmLocalUnixMakefileGenerator3(this, snapshot);
   lg->SetMakefileVariableSize(32);
   lg->SetMakeCommandEscapeTargetTwice(true);
   lg->SetBorlandMakeCurlyHack(true);
diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h
index 2ec510d..62e458f 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.h
+++ b/Source/cmGlobalBorlandMakefileGenerator.h
@@ -36,8 +36,7 @@ public:
   static void GetDocumentation(cmDocumentationEntry& entry);
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 46c1ccc..01f50ed 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1986,22 +1986,20 @@ void cmGlobalGenerator::EnableInstallTarget()
 }
 
 cmLocalGenerator *
-cmGlobalGenerator::MakeLocalGenerator(cmState::Snapshot snapshot,
-                                      cmLocalGenerator *parent)
+cmGlobalGenerator::MakeLocalGenerator(cmState::Snapshot snapshot)
 {
   if (!snapshot.IsValid())
     {
     snapshot = this->CMakeInstance->GetCurrentSnapshot();
     }
 
-  return this->CreateLocalGenerator(parent, snapshot);
+  return this->CreateLocalGenerator(snapshot);
 }
 
 cmLocalGenerator*
-cmGlobalGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
-                                        cmState::Snapshot snapshot)
+cmGlobalGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
 {
-  return new cmLocalGenerator(this, parent, snapshot);
+  return new cmLocalGenerator(this, snapshot);
 }
 
 void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 21cbd44..2e0f7b5 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -56,9 +56,8 @@ public:
   cmGlobalGenerator(cmake* cm);
   virtual ~cmGlobalGenerator();
 
-  cmLocalGenerator* MakeLocalGenerator(
-      cmState::Snapshot snapshot = cmState::Snapshot(),
-      cmLocalGenerator* parent = 0);
+  cmLocalGenerator*
+  MakeLocalGenerator(cmState::Snapshot snapshot = cmState::Snapshot());
 
   ///! Get the name for this generator
   virtual std::string GetName() const { return "Generic"; }
@@ -442,8 +441,7 @@ protected:
 
 private:
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   cmMakefile* TryCompileOuterMakefile;
   // If you add a new map here, make sure it is copied
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index f764418..29abb37 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -33,10 +33,9 @@ cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator()
 }
 
 cmLocalGenerator *
-cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
-                                                cmState::Snapshot snapshot)
+cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
 {
-  return new cmLocalGhsMultiGenerator(this, parent, snapshot);
+  return new cmLocalGhsMultiGenerator(this, snapshot);
 }
 
 void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry &entry)
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index f1a3ed7..873c20f 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -31,8 +31,7 @@ public:
   { return new cmGlobalGeneratorSimpleFactory<cmGlobalGhsMultiGenerator>(); }
 
   ///! create the correct local generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   /// @return the name of this generator.
   static std::string GetActualName() { return "Green Hills MULTI"; }
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index b92ad32..72ef4d6 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -528,10 +528,9 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator(cmake* cm)
 // Virtual public methods.
 
 cmLocalGenerator*
-cmGlobalNinjaGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
-                                             cmState::Snapshot snapshot)
+cmGlobalNinjaGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
 {
-  return new cmLocalNinjaGenerator(this, parent, snapshot);
+  return new cmLocalNinjaGenerator(this, snapshot);
 }
 
 void cmGlobalNinjaGenerator
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index f103801..418d6f7 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -170,8 +170,7 @@ public:
   virtual ~cmGlobalNinjaGenerator() { }
 
   /// Overloaded methods. @see cmGlobalGenerator::CreateLocalGenerator()
-  virtual cmLocalGenerator* CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator* CreateLocalGenerator(cmState::Snapshot snapshot);
 
   /// Overloaded methods. @see cmGlobalGenerator::GetName().
   virtual std::string GetName() const {
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 605ece2..0f491aa 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -59,11 +59,10 @@ void cmGlobalUnixMakefileGenerator3
 }
 
 ///! Create a local generator appropriate to this Global Generator
-cmLocalGenerator *
-cmGlobalUnixMakefileGenerator3::CreateLocalGenerator(cmLocalGenerator* parent,
-                                                   cmState::Snapshot snapshot)
+cmLocalGenerator* cmGlobalUnixMakefileGenerator3::CreateLocalGenerator(
+    cmState::Snapshot snapshot)
 {
-  return new cmLocalUnixMakefileGenerator3(this, parent, snapshot);
+  return new cmLocalUnixMakefileGenerator3(this, snapshot);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index c738c16..3ea6bb2 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -68,8 +68,7 @@ public:
   static void GetDocumentation(cmDocumentationEntry& entry);
 
   ///! Create a local generator appropriate to this Global Generator3
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 8ec4fd9..a36fed1 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -306,11 +306,10 @@ void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout)
 }
 
 ///! Create a local generator appropriate to this Global Generator
-cmLocalGenerator *
-cmGlobalVisualStudio10Generator::CreateLocalGenerator(cmLocalGenerator* parent,
-                                                    cmState::Snapshot snapshot)
+cmLocalGenerator* cmGlobalVisualStudio10Generator::CreateLocalGenerator(
+    cmState::Snapshot snapshot)
 {
-  return new cmLocalVisualStudio10Generator(this, parent, snapshot);
+  return new cmLocalVisualStudio10Generator(this, snapshot);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 3d34a3f..bbc22b9 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -48,8 +48,7 @@ public:
   virtual bool Compute();
 
   ///! create the correct local generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index b7c897c..48c3d32 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -173,10 +173,10 @@ cmGlobalVisualStudio6Generator::GenerateBuildCommand(
 
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator *
-cmGlobalVisualStudio6Generator::CreateLocalGenerator(cmLocalGenerator* parent,
+cmGlobalVisualStudio6Generator::CreateLocalGenerator(
                                                    cmState::Snapshot snapshot)
 {
-  return new cmLocalVisualStudio6Generator(this, parent, snapshot);
+  return new cmLocalVisualStudio6Generator(this, snapshot);
 }
 
 
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index 420cb0b..0169be0 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -39,8 +39,7 @@ public:
   static void GetDocumentation(cmDocumentationEntry& entry);
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 2660d23..b8f6357 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -279,12 +279,11 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
 }
 
 ///! Create a local generator appropriate to this Global Generator
-cmLocalGenerator *
-cmGlobalVisualStudio7Generator::CreateLocalGenerator(cmLocalGenerator* parent,
-                                                   cmState::Snapshot snapshot)
+cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator(
+    cmState::Snapshot snapshot)
 {
   cmLocalVisualStudio7Generator *lg =
-    new cmLocalVisualStudio7Generator(this, parent, snapshot);
+    new cmLocalVisualStudio7Generator(this, snapshot);
   return lg;
 }
 
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 931ac9c..5ada2c5 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -43,8 +43,7 @@ public:
   std::string const& GetPlatformName() const;
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   virtual bool SetSystemName(std::string const& s, cmMakefile* mf);
 
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index eb547bd..af3629d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -371,10 +371,9 @@ cmGlobalXCodeGenerator::GenerateBuildCommand(
 //----------------------------------------------------------------------------
 ///! Create a local generator appropriate to this Global Generator
 cmLocalGenerator *
-cmGlobalXCodeGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
-                                             cmState::Snapshot snapshot)
+cmGlobalXCodeGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
 {
-  return new cmLocalXCodeGenerator(this, parent, snapshot);
+  return new cmLocalXCodeGenerator(this, snapshot);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ee8bf2c..f93f62f 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -41,8 +41,7 @@ public:
   static void GetDocumentation(cmDocumentationEntry& entry);
 
   ///! Create a local generator appropriate to this Global Generator
-  virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
-                                                 cmState::Snapshot snapshot);
+  virtual cmLocalGenerator *CreateLocalGenerator(cmState::Snapshot snapshot);
 
   /**
    * Try to determine system information such as shared library
diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx
index 4583446..58c707c 100644
--- a/Source/cmLocalCommonGenerator.cxx
+++ b/Source/cmLocalCommonGenerator.cxx
@@ -14,9 +14,8 @@
 #include "cmMakefile.h"
 
 cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg,
-                                               cmLocalGenerator* parent,
                                                cmState::Snapshot snapshot):
-  cmLocalGenerator(gg, parent, snapshot)
+  cmLocalGenerator(gg, snapshot)
 {
 }
 
diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h
index af94cda..b7caf0b 100644
--- a/Source/cmLocalCommonGenerator.h
+++ b/Source/cmLocalCommonGenerator.h
@@ -23,7 +23,6 @@ class cmLocalCommonGenerator: public cmLocalGenerator
 {
 public:
   cmLocalCommonGenerator(cmGlobalGenerator* gg,
-                         cmLocalGenerator* parent,
                          cmState::Snapshot snapshot);
   ~cmLocalCommonGenerator();
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 7ce4819..aea14d5 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -43,13 +43,11 @@
 #endif
 
 cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
-                                   cmLocalGenerator* parent,
                                    cmState::Snapshot snapshot)
   : cmOutputConverter(snapshot), StateSnapshot(snapshot)
 {
   assert(snapshot.IsValid());
   this->GlobalGenerator = gg;
-  this->Parent = parent;
 
   this->Makefile = new cmMakefile(this);
 
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 915814b..4c0b1fe 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -36,8 +36,7 @@ class cmCustomCommandGenerator;
 class cmLocalGenerator : public cmOutputConverter
 {
 public:
-  cmLocalGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
-                   cmState::Snapshot snapshot);
+  cmLocalGenerator(cmGlobalGenerator* gg, cmState::Snapshot snapshot);
   virtual ~cmLocalGenerator();
 
   /**
@@ -86,9 +85,6 @@ public:
   cmState* GetState() const;
   cmState::Snapshot GetStateSnapshot() const;
 
-  ///! set/get the parent generator
-  cmLocalGenerator* GetParent() const {return this->Parent;}
-
   void AddArchitectureFlags(std::string& flags,
                             cmGeneratorTarget const* target,
                             const std::string&lang, const std::string& config);
@@ -343,7 +339,6 @@ protected:
   cmMakefile *Makefile;
   cmState::Snapshot StateSnapshot;
   cmGlobalGenerator *GlobalGenerator;
-  cmLocalGenerator* Parent;
   std::map<std::string, std::string> UniqueObjectNamesMap;
   std::string::size_type ObjectPathMax;
   std::set<std::string> ObjectMaxPathViolations;
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx
index 8e498dd..91dfeb4 100644
--- a/Source/cmLocalGhsMultiGenerator.cxx
+++ b/Source/cmLocalGhsMultiGenerator.cxx
@@ -17,9 +17,8 @@
 #include "cmGeneratedFileStream.h"
 
 cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
-                                                   cmLocalGenerator* parent,
                                                    cmState::Snapshot snapshot)
-  : cmLocalGenerator(gg, parent, snapshot)
+  : cmLocalGenerator(gg, snapshot)
 {
 }
 
diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h
index f52ef39..3309bfd 100644
--- a/Source/cmLocalGhsMultiGenerator.h
+++ b/Source/cmLocalGhsMultiGenerator.h
@@ -25,7 +25,7 @@ class cmGeneratedFileStream;
 class cmLocalGhsMultiGenerator : public cmLocalGenerator
 {
 public:
-  cmLocalGhsMultiGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
+  cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
                            cmState::Snapshot snapshot);
 
   virtual ~cmLocalGhsMultiGenerator();
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index cfca418..62bf8b2 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -23,9 +23,8 @@
 #include <assert.h>
 
 cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
-                                             cmLocalGenerator* parent,
                                              cmState::Snapshot snapshot)
-  : cmLocalCommonGenerator(gg, parent, snapshot)
+  : cmLocalCommonGenerator(gg, snapshot)
   , HomeRelativeOutputPath("")
 {
   this->TargetImplib = "$TARGET_IMPLIB";
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index d10be0c..4c158bc 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -31,7 +31,7 @@ class cmake;
 class cmLocalNinjaGenerator : public cmLocalCommonGenerator
 {
 public:
-  cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
+  cmLocalNinjaGenerator(cmGlobalGenerator* gg,
                         cmState::Snapshot snapshot);
 
   virtual ~cmLocalNinjaGenerator();
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 589105e..d2b60d3 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -80,9 +80,9 @@ static std::string cmSplitExtension(std::string const& in, std::string& base)
 
 //----------------------------------------------------------------------------
 cmLocalUnixMakefileGenerator3::
-cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent,
+cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg,
                               cmState::Snapshot snapshot)
-  : cmLocalCommonGenerator(gg, parent, snapshot)
+  : cmLocalCommonGenerator(gg, snapshot)
 {
   this->MakefileVariableSize = 0;
   this->ColorMakefile = false;
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 01ac01b..2b9af38 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -35,7 +35,6 @@ class cmLocalUnixMakefileGenerator3 : public cmLocalCommonGenerator
 {
 public:
   cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg,
-                                cmLocalGenerator* parent,
                                 cmState::Snapshot snapshot);
   virtual ~cmLocalUnixMakefileGenerator3();
 
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 9e3185c..25b3f19 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -63,9 +63,8 @@ class cmVS10XMLParser : public cmXMLParser
 //----------------------------------------------------------------------------
 cmLocalVisualStudio10Generator
 ::cmLocalVisualStudio10Generator(cmGlobalGenerator* gg,
-                                 cmLocalGenerator* parent,
                                  cmState::Snapshot snapshot):
-  cmLocalVisualStudio7Generator(gg, parent, snapshot)
+  cmLocalVisualStudio7Generator(gg, snapshot)
 {
 }
 
diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h
index c588aaf..0f179fd 100644
--- a/Source/cmLocalVisualStudio10Generator.h
+++ b/Source/cmLocalVisualStudio10Generator.h
@@ -26,7 +26,6 @@ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator
 public:
   ///! Set cache only and recurse to false by default.
   cmLocalVisualStudio10Generator(cmGlobalGenerator* gg,
-                                 cmLocalGenerator* parent,
                                  cmState::Snapshot snapshot);
 
   virtual ~cmLocalVisualStudio10Generator();
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 3a44367..46e1987 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -25,9 +25,8 @@
 
 cmLocalVisualStudio6Generator
 ::cmLocalVisualStudio6Generator(cmGlobalGenerator* gg,
-                                cmLocalGenerator* parent,
                                 cmState::Snapshot snapshot):
-  cmLocalVisualStudioGenerator(gg, parent, snapshot)
+  cmLocalVisualStudioGenerator(gg, snapshot)
 {
 }
 
diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h
index a44e61d..86b4906 100644
--- a/Source/cmLocalVisualStudio6Generator.h
+++ b/Source/cmLocalVisualStudio6Generator.h
@@ -30,7 +30,6 @@ class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator
 public:
   ///! Set cache only and recurse to false by default.
   cmLocalVisualStudio6Generator(cmGlobalGenerator* gg,
-                                cmLocalGenerator* parent,
                                 cmState::Snapshot snapshot);
 
   virtual ~cmLocalVisualStudio6Generator();
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 55ad852..eebed7e 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -54,9 +54,8 @@ static void cmConvertToWindowsSlash(std::string& s)
 //----------------------------------------------------------------------------
 cmLocalVisualStudio7Generator
 ::cmLocalVisualStudio7Generator(cmGlobalGenerator* gg,
-                                cmLocalGenerator* parent,
                                 cmState::Snapshot snapshot):
-  cmLocalVisualStudioGenerator(gg, parent, snapshot)
+  cmLocalVisualStudioGenerator(gg, snapshot)
 {
   this->Internal = new cmLocalVisualStudio7GeneratorInternals(this);
 }
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index 43f3af9..42ae097 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -36,7 +36,6 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator
 public:
   ///! Set cache only and recurse to false by default.
   cmLocalVisualStudio7Generator(cmGlobalGenerator* gg,
-                                cmLocalGenerator* parent,
                                 cmState::Snapshot snapshot);
 
   virtual ~cmLocalVisualStudio7Generator();
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 3588853..70f729f 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -20,9 +20,8 @@
 //----------------------------------------------------------------------------
 cmLocalVisualStudioGenerator
 ::cmLocalVisualStudioGenerator(cmGlobalGenerator* gg,
-                               cmLocalGenerator* parent,
                                cmState::Snapshot snapshot)
-  : cmLocalGenerator(gg, parent, snapshot)
+  : cmLocalGenerator(gg, snapshot)
 {
 }
 
diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h
index d414651..32244c7 100644
--- a/Source/cmLocalVisualStudioGenerator.h
+++ b/Source/cmLocalVisualStudioGenerator.h
@@ -32,7 +32,6 @@ class cmLocalVisualStudioGenerator : public cmLocalGenerator
 {
 public:
   cmLocalVisualStudioGenerator(cmGlobalGenerator* gg,
-                               cmLocalGenerator* parent,
                                cmState::Snapshot snapshot);
   virtual ~cmLocalVisualStudioGenerator();
 
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index 804dd7d..d6576f6 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -16,9 +16,8 @@
 
 //----------------------------------------------------------------------------
 cmLocalXCodeGenerator::cmLocalXCodeGenerator(cmGlobalGenerator* gg,
-                                             cmLocalGenerator* parent,
                                              cmState::Snapshot snapshot)
-  : cmLocalGenerator(gg, parent, snapshot)
+  : cmLocalGenerator(gg, snapshot)
 {
   // the global generator does this, so do not
   // put these flags into the language flags
diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h
index 26fff9c..d96e78c 100644
--- a/Source/cmLocalXCodeGenerator.h
+++ b/Source/cmLocalXCodeGenerator.h
@@ -24,7 +24,7 @@ class cmLocalXCodeGenerator : public cmLocalGenerator
 {
 public:
   ///! Set cache only and recurse to false by default.
-  cmLocalXCodeGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
+  cmLocalXCodeGenerator(cmGlobalGenerator* gg,
                         cmState::Snapshot snapshot);
 
   virtual ~cmLocalXCodeGenerator();
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4a4663a..2ba12a4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1755,7 +1755,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);
+        ->MakeLocalGenerator(newSnapshot);
   this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile());
   this->GetGlobalGenerator()->AddLocalGenerator(lg2);
 

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

Summary of changes:
 Source/CPack/cmCPackGenerator.cxx           |    6 +-
 Source/CPack/cpack.cxx                      |   10 +--
 Source/CTest/cmCTestLaunch.cxx              |    5 +-
 Source/CTest/cmCTestScriptHandler.cxx       |   45 +++++---------
 Source/CTest/cmCTestTestHandler.cxx         |    5 +-
 Source/cmCTest.cxx                          |    7 ++-
 Source/cmGlobalBorlandMakefileGenerator.cxx |    4 +-
 Source/cmGlobalBorlandMakefileGenerator.h   |    3 +-
 Source/cmGlobalGenerator.cxx                |   87 +++++++++++++--------------
 Source/cmGlobalGenerator.h                  |   12 ++--
 Source/cmGlobalGhsMultiGenerator.cxx        |    5 +-
 Source/cmGlobalGhsMultiGenerator.h          |    3 +-
 Source/cmGlobalNinjaGenerator.cxx           |    5 +-
 Source/cmGlobalNinjaGenerator.h             |   14 +----
 Source/cmGlobalUnixMakefileGenerator3.cxx   |   14 +++--
 Source/cmGlobalUnixMakefileGenerator3.h     |    4 +-
 Source/cmGlobalVisualStudio10Generator.cxx  |    7 +--
 Source/cmGlobalVisualStudio10Generator.h    |    3 +-
 Source/cmGlobalVisualStudio6Generator.cxx   |    5 +-
 Source/cmGlobalVisualStudio6Generator.h     |    3 +-
 Source/cmGlobalVisualStudio7Generator.cxx   |    7 +--
 Source/cmGlobalVisualStudio7Generator.h     |    3 +-
 Source/cmGlobalXCodeGenerator.cxx           |    5 +-
 Source/cmGlobalXCodeGenerator.h             |    3 +-
 Source/cmGraphVizWriter.cxx                 |    5 +-
 Source/cmLocalCommonGenerator.cxx           |    5 +-
 Source/cmLocalCommonGenerator.h             |    4 +-
 Source/cmLocalGenerator.cxx                 |   11 ++--
 Source/cmLocalGenerator.h                   |    7 +--
 Source/cmLocalGhsMultiGenerator.cxx         |    5 +-
 Source/cmLocalGhsMultiGenerator.h           |    3 +-
 Source/cmLocalNinjaGenerator.cxx            |    5 +-
 Source/cmLocalNinjaGenerator.h              |    3 +-
 Source/cmLocalUnixMakefileGenerator3.cxx    |    5 +-
 Source/cmLocalUnixMakefileGenerator3.h      |    4 +-
 Source/cmLocalVisualStudio10Generator.cxx   |    6 +-
 Source/cmLocalVisualStudio10Generator.h     |    4 +-
 Source/cmLocalVisualStudio6Generator.cxx    |    6 +-
 Source/cmLocalVisualStudio6Generator.h      |    4 +-
 Source/cmLocalVisualStudio7Generator.cxx    |    6 +-
 Source/cmLocalVisualStudio7Generator.h      |    4 +-
 Source/cmLocalVisualStudioGenerator.cxx     |    6 +-
 Source/cmLocalVisualStudioGenerator.h       |    4 +-
 Source/cmLocalXCodeGenerator.cxx            |    5 +-
 Source/cmLocalXCodeGenerator.h              |    4 +-
 Source/cmMakefile.cxx                       |   24 +++-----
 Source/cmMakefile.h                         |    6 +-
 Source/cmQtAutoGenerators.cxx               |    5 +-
 Source/cmake.cxx                            |   20 +++---
 Source/cmcmd.cxx                            |    5 +-
 50 files changed, 184 insertions(+), 247 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list