[Cmake-commits] CMake branch, next, updated. v2.8.12-4897-gdf8bb56

Brad King brad.king at kitware.com
Tue Nov 5 08:53:27 EST 2013


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  df8bb5647814be4a5df1b0f22e0658ec62c5beb5 (commit)
       via  5cf1120fbf11fcc6bb5f5f15b0e2c8472bafc261 (commit)
      from  2dd5c0d0d2481a78b9d20ef769c11be03d376dbc (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=df8bb5647814be4a5df1b0f22e0658ec62c5beb5
commit df8bb5647814be4a5df1b0f22e0658ec62c5beb5
Merge: 2dd5c0d 5cf1120
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 5 08:53:24 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 5 08:53:24 2013 -0500

    Merge topic 'clear-generator-data' into next
    
    5cf1120 cmGlobalGenerator: Refactor member cleanup between configures

diff --cc Source/cmGlobalGenerator.h
index 2e20a4d,4529060..d9d5e61
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@@ -414,11 -412,11 +414,12 @@@ private
    // Per-target generator information.
    cmGeneratorTargetsType GeneratorTargets;
    void CreateGeneratorTargets();
 +  void FinalizeTargetCompileDefinitions();
    void ComputeGeneratorTargetObjects();
-   void ClearGeneratorTargets();
    virtual void ComputeTargetObjects(cmGeneratorTarget* gt) const;
  
+   void ClearGeneratorMembers();
+ 
    // Cache directory content and target files to be built.
    struct DirectoryContent: public std::set<cmStdString>
    {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cf1120fbf11fcc6bb5f5f15b0e2c8472bafc261
commit 5cf1120fbf11fcc6bb5f5f15b0e2c8472bafc261
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 4 16:06:51 2013 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 5 07:27:42 2013 -0500

    cmGlobalGenerator: Refactor member cleanup between configures
    
    Factor member cleanup out from cmGlobalGenerator::Configure and the
    destructor into a dedicated helper to avoid duplication.  This fixes
    clearing of BuildExportSets between configures.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index dd7311e..f7c4b94 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -66,32 +66,12 @@ cmGlobalGenerator::cmGlobalGenerator()
 
 cmGlobalGenerator::~cmGlobalGenerator()
 {
-  // Delete any existing cmLocalGenerators
-  for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
-    {
-    delete this->LocalGenerators[i];
-    }
-  for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
-      li = this->EvaluationFiles.begin();
-      li != this->EvaluationFiles.end();
-      ++li)
-    {
-    delete *li;
-    }
-  for(std::map<std::string, cmExportBuildFileGenerator*>::iterator
-        i = this->BuildExportSets.begin();
-      i != this->BuildExportSets.end(); ++i)
-    {
-    delete i->second;
-    }
-  this->LocalGenerators.clear();
+  this->ClearGeneratorMembers();
 
   if (this->ExtraGenerator)
     {
     delete this->ExtraGenerator;
     }
-
-  this->ClearGeneratorTargets();
 }
 
 bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts)
@@ -970,31 +950,7 @@ bool cmGlobalGenerator::IsDependedOn(const char* project,
 void cmGlobalGenerator::Configure()
 {
   this->FirstTimeProgress = 0.0f;
-  this->ClearGeneratorTargets();
-  this->ExportSets.clear();
-  // Delete any existing cmLocalGenerators
-  unsigned int i;
-  for (i = 0; i < this->LocalGenerators.size(); ++i)
-    {
-    delete this->LocalGenerators[i];
-    }
-  this->LocalGenerators.clear();
-  for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
-      li = this->EvaluationFiles.begin();
-      li != this->EvaluationFiles.end();
-      ++li)
-    {
-    delete *li;
-    }
-  this->EvaluationFiles.clear();
-  this->TargetDependencies.clear();
-  this->TotalTargets.clear();
-  this->ImportedTargets.clear();
-  this->LocalGeneratorToTargetMap.clear();
-  this->ProjectMap.clear();
-  this->RuleHashes.clear();
-  this->DirectoryContentMap.clear();
-  this->BinaryDirectories.clear();
+  this->ClearGeneratorMembers();
 
   // start with this directory
   cmLocalGenerator *lg = this->CreateLocalGenerator();
@@ -1383,7 +1339,7 @@ void cmGlobalGenerator::ComputeGeneratorTargetObjects()
 }
 
 //----------------------------------------------------------------------------
-void cmGlobalGenerator::ClearGeneratorTargets()
+void cmGlobalGenerator::ClearGeneratorMembers()
 {
   for(cmGeneratorTargetsType::iterator i = this->GeneratorTargets.begin();
       i != this->GeneratorTargets.end(); ++i)
@@ -1391,6 +1347,39 @@ void cmGlobalGenerator::ClearGeneratorTargets()
     delete i->second;
     }
   this->GeneratorTargets.clear();
+
+  for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
+      li = this->EvaluationFiles.begin();
+      li != this->EvaluationFiles.end();
+      ++li)
+    {
+    delete *li;
+    }
+  this->EvaluationFiles.clear();
+
+  for(std::map<std::string, cmExportBuildFileGenerator*>::iterator
+        i = this->BuildExportSets.begin();
+      i != this->BuildExportSets.end(); ++i)
+    {
+    delete i->second;
+    }
+  this->BuildExportSets.clear();
+
+  for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
+    {
+    delete this->LocalGenerators[i];
+    }
+  this->LocalGenerators.clear();
+
+  this->ExportSets.clear();
+  this->TargetDependencies.clear();
+  this->TotalTargets.clear();
+  this->ImportedTargets.clear();
+  this->LocalGeneratorToTargetMap.clear();
+  this->ProjectMap.clear();
+  this->RuleHashes.clear();
+  this->DirectoryContentMap.clear();
+  this->BinaryDirectories.clear();
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 4d6e10f..4529060 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -413,9 +413,10 @@ private:
   cmGeneratorTargetsType GeneratorTargets;
   void CreateGeneratorTargets();
   void ComputeGeneratorTargetObjects();
-  void ClearGeneratorTargets();
   virtual void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
+  void ClearGeneratorMembers();
+
   // Cache directory content and target files to be built.
   struct DirectoryContent: public std::set<cmStdString>
   {

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

Summary of changes:
 Source/cmGlobalGenerator.cxx |   83 ++++++++++++++++++------------------------
 Source/cmGlobalGenerator.h   |    3 +-
 2 files changed, 38 insertions(+), 48 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list