[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-778-ga174f7e

Stephen Kelly steveire at gmail.com
Tue Oct 20 19:18:17 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  a174f7e14b464be73a4282f9d1ade942f1476b5c (commit)
       via  47f10ce212e3b0cdcbf72c2c24b257ba3ae3d935 (commit)
      from  edb731113d63696ae691dfca207c2155129ff27c (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a174f7e14b464be73a4282f9d1ade942f1476b5c
commit a174f7e14b464be73a4282f9d1ade942f1476b5c
Merge: edb7311 47f10ce
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Oct 20 19:18:16 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Oct 20 19:18:16 2015 -0400

    Merge topic 'cmLocalGenerator-generator-target-storage' into next
    
    47f10ce2 Revert "cmLocalGenerator: Store a vector of generator targets."


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47f10ce212e3b0cdcbf72c2c24b257ba3ae3d935
commit 47f10ce212e3b0cdcbf72c2c24b257ba3ae3d935
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 21 01:17:46 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Oct 21 01:17:46 2015 +0200

    Revert "cmLocalGenerator: Store a vector of generator targets."
    
    This reverts commit 2ac7d953c36c36293922e53daed7a1737a813d23.

diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 1921f03..31c05fd 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -965,13 +965,13 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
        it != this->GlobalGenerator->GetLocalGenerators().end();
        ++it)
     {
-    std::vector<cmGeneratorTarget*> targets = (*it)->GetGeneratorTargets();
-    for (std::vector<cmGeneratorTarget*>::iterator l = targets.begin();
+    cmGeneratorTargetsType targets = (*it)->GetGeneratorTargets();
+    for (cmGeneratorTargetsType::iterator l = targets.begin();
          l != targets.end(); ++l)
       {
       std::vector<std::string> includeDirs;
       std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
-      (*it)->GetIncludeDirectories(includeDirs, *l, "C", config);
+      (*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);
       this->AppendIncludeDirectories(fout, includeDirs, emmited);
       }
     }
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 32cfcea..a55365f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1584,7 +1584,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes,
       cmTarget* t = &ti->second;
       cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
       this->GeneratorTargets[t] = gt;
-      lg->AddGeneratorTarget(gt);
+      lg->AddGeneratorTarget(t, gt);
       }
     }
 
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx
index 8659e34..4eec3fb 100644
--- a/Source/cmGlobalKdevelopGenerator.cxx
+++ b/Source/cmGlobalKdevelopGenerator.cxx
@@ -68,14 +68,13 @@ void cmGlobalKdevelopGenerator::Generate()
     for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin();
          lg!=lgs.end(); lg++)
       {
-      std::vector<cmGeneratorTarget*> const& targets =
-          (*lg)->GetGeneratorTargets();
-      for (std::vector<cmGeneratorTarget*>::const_iterator ti =
-           targets.begin(); ti != targets.end(); ti++)
+      cmGeneratorTargetsType const& targets = (*lg)->GetGeneratorTargets();
+      for (cmGeneratorTargetsType::const_iterator ti = targets.begin();
+           ti != targets.end(); ti++)
         {
-        if ((*ti)->GetType()==cmState::EXECUTABLE)
+        if (ti->second->GetType()==cmState::EXECUTABLE)
           {
-          executable = (*ti)->GetLocation("");
+          executable = ti->second->GetLocation("");
           break;
           }
         }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 74d23a3..44e3de6 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -460,11 +460,11 @@ cmGlobalUnixMakefileGenerator3
   // The directory-level rule should depend on the target-level rules
   // for all targets in the directory.
   std::vector<std::string> depends;
-  std::vector<cmGeneratorTarget*> targets = lg->GetGeneratorTargets();
-  for(std::vector<cmGeneratorTarget*>::iterator l = targets.begin();
+  cmGeneratorTargetsType targets = lg->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::iterator l = targets.begin();
       l != targets.end(); ++l)
     {
-    cmGeneratorTarget* gtarget = *l;
+    cmGeneratorTarget* gtarget = l->second;
     int type = gtarget->GetType();
     if((type == cmState::EXECUTABLE) ||
        (type == cmState::STATIC_LIBRARY) ||
@@ -623,11 +623,11 @@ cmGlobalUnixMakefileGenerator3
     lg = static_cast<cmLocalUnixMakefileGenerator3 *>
       (this->LocalGenerators[i]);
     // for each target Generate the rule files for each target.
-    std::vector<cmGeneratorTarget*> targets = lg->GetGeneratorTargets();
-    for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin();
+    cmGeneratorTargetsType targets = lg->GetGeneratorTargets();
+    for(cmGeneratorTargetsType::iterator t = targets.begin();
         t != targets.end(); ++t)
       {
-      cmGeneratorTarget* gtarget = *t;
+      cmGeneratorTarget* gtarget = t->second;
       // Don't emit the same rule twice (e.g. two targets with the same
       // simple name)
       int type = gtarget->GetType();
@@ -720,11 +720,11 @@ cmGlobalUnixMakefileGenerator3
   depends.push_back("cmake_check_build_system");
 
   // for each target Generate the rule files for each target.
-  std::vector<cmGeneratorTarget*> targets = lg->GetGeneratorTargets();
-  for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin();
+  cmGeneratorTargetsType targets = lg->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    cmGeneratorTarget* gtarget = *t;
+    cmGeneratorTarget* gtarget = t->second;
     int type = gtarget->GetType();
     std::string name = gtarget->GetName();
     if (!name.empty()
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index a22315c..61b19cf 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -256,7 +256,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
                           noCommandLines);
 
   cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
-  lg->AddGeneratorTarget(gt);
+  lg->AddGeneratorTarget(tgt, gt);
   this->AddGeneratorTarget(tgt, gt);
 
   // Organize in the "predefined targets" folder:
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 3514e57..3838ebc 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -459,7 +459,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
                         "echo", "Build all projects");
 
   cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
-  root->AddGeneratorTarget(allBuildGt);
+  root->AddGeneratorTarget(allbuild, allBuildGt);
   root->GetGlobalGenerator()->AddGeneratorTarget(allbuild, allBuildGt);
 
   // Refer to the main build configuration file for easy editing.
@@ -495,7 +495,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
                           "make", "-f", file.c_str());
 
     cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root);
-    root->AddGeneratorTarget(checkGt);
+    root->AddGeneratorTarget(check, checkGt);
     root->GetGlobalGenerator()->AddGeneratorTarget(check, checkGt);
     }
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 41d7cce..833ffbf 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -132,15 +132,15 @@ void cmLocalGenerator::TraceDependencies()
     this->GlobalGenerator->CreateEvaluationSourceFiles(*ci);
     }
   // Generate the rule files for each target.
-  std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets();
-  for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin();
+  cmGeneratorTargetsType targets = this->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    if ((*t)->GetType() == cmState::INTERFACE_LIBRARY)
+    if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
       }
-    (*t)->TraceDependencies();
+    t->second->TraceDependencies();
     }
 }
 
@@ -448,9 +448,9 @@ void cmLocalGenerator::GenerateInstallRules()
 }
 
 
-void cmLocalGenerator::AddGeneratorTarget(cmGeneratorTarget* gt)
+void cmLocalGenerator::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
 {
-  this->GeneratorTargets.push_back(gt);
+  this->GeneratorTargets[t] = gt;
 }
 
 //----------------------------------------------------------------------------
@@ -465,12 +465,12 @@ void cmLocalGenerator::ComputeTargetManifest()
     }
 
   // Add our targets to the manifest for each configuration.
-  std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets();
-  for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin();
+  cmGeneratorTargetsType targets = this->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    cmGeneratorTarget* target = *t;
-    if (target->GetType() == cmState::INTERFACE_LIBRARY)
+    cmGeneratorTarget& target = *t->second;
+    if (target.GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
       }
@@ -478,7 +478,7 @@ void cmLocalGenerator::ComputeTargetManifest()
         ci != configNames.end(); ++ci)
       {
       const char* config = ci->c_str();
-      target->ComputeTargetManifest(config);
+      target.ComputeTargetManifest(config);
       }
     }
 }
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 1375985..307c67f 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -113,12 +113,12 @@ public:
                               bool forResponseFile = false,
                               const std::string& config = "");
 
-  const std::vector<cmGeneratorTarget*> &GetGeneratorTargets() const
+  const cmGeneratorTargetsType &GetGeneratorTargets() const
     {
       return this->GeneratorTargets;
     }
 
-  void AddGeneratorTarget(cmGeneratorTarget* gt);
+  void AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt);
 
   cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
 
@@ -367,7 +367,7 @@ protected:
   std::set<std::string> ObjectMaxPathViolations;
 
   std::set<cmGeneratorTarget const*> WarnCMP0063;
-  std::vector<cmGeneratorTarget*> GeneratorTargets;
+  cmGeneratorTargetsType GeneratorTargets;
 
   bool EmitUniversalBinaryFlags;
 
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx
index a77a75e..869ba2c 100644
--- a/Source/cmLocalGhsMultiGenerator.cxx
+++ b/Source/cmLocalGhsMultiGenerator.cxx
@@ -26,16 +26,16 @@ cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator() {}
 
 void cmLocalGhsMultiGenerator::Generate()
 {
-  std::vector<cmGeneratorTarget*> tgts = this->GetGeneratorTargets();
+  cmGeneratorTargetsType tgts = this->GetGeneratorTargets();
 
-  for (std::vector<cmGeneratorTarget*>::iterator l = tgts.begin();
-       l != tgts.end(); ++l)
+  for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
+       ++l)
     {
-    if ((*l)->GetType() == cmState::INTERFACE_LIBRARY)
+    if (l->second->GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
       }
-    cmGhsMultiTargetGenerator tg(*l);
+    cmGhsMultiTargetGenerator tg(l->second);
     tg.Generate();
     }
 }
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 3dd18bd..756c139 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -73,23 +73,23 @@ void cmLocalNinjaGenerator::Generate()
       }
     }
 
-  std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets();
-  for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin();
+  cmGeneratorTargetsType targets = this->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    if ((*t)->GetType() == cmState::INTERFACE_LIBRARY)
+    if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
       }
-    cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(*t);
+    cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(t->second);
     if(tg)
       {
       tg->Generate();
       // Add the target to "all" if required.
       if (!this->GetGlobalNinjaGenerator()->IsExcluded(
             this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0],
-            *t))
-        this->GetGlobalNinjaGenerator()->AddDependencyToAll((*t)->Target);
+            t->second))
+        this->GetGlobalNinjaGenerator()->AddDependencyToAll(t->second->Target);
       delete tg;
       }
     }
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 07f763b..5485da4 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -113,18 +113,18 @@ void cmLocalUnixMakefileGenerator3::Generate()
     this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES");
 
   // Generate the rule files for each target.
-  std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets();
+  cmGeneratorTargetsType targets = this->GetGeneratorTargets();
   cmGlobalUnixMakefileGenerator3* gg =
     static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
-  for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin();
+  for(cmGeneratorTargetsType::iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    if ((*t)->GetType() == cmState::INTERFACE_LIBRARY)
+    if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
       }
     cmsys::auto_ptr<cmMakefileTargetGenerator> tg(
-      cmMakefileTargetGenerator::New(*t));
+      cmMakefileTargetGenerator::New(t->second));
     if (tg.get())
       {
       tg->WriteRuleFiles();
@@ -174,11 +174,11 @@ void cmLocalUnixMakefileGenerator3::
 GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
 {
   std::set<std::string> emitted;
-  std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets();
-  for(std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
+  cmGeneratorTargetsType targets = this->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::iterator ti = targets.begin();
       ti != targets.end(); ++ti)
     {
-    cmGeneratorTarget* gt = *ti;
+    cmGeneratorTarget* gt = ti->second;
     if (gt->GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
@@ -417,22 +417,22 @@ void cmLocalUnixMakefileGenerator3
 
   // for each target we just provide a rule to cd up to the top and do a make
   // on the target
-  std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets();
+  cmGeneratorTargetsType targets = this->GetGeneratorTargets();
   std::string localName;
-  for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin();
+  for(cmGeneratorTargetsType::iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    if(((*t)->GetType() == cmState::EXECUTABLE) ||
-       ((*t)->GetType() == cmState::STATIC_LIBRARY) ||
-       ((*t)->GetType() == cmState::SHARED_LIBRARY) ||
-       ((*t)->GetType() == cmState::MODULE_LIBRARY) ||
-       ((*t)->GetType() == cmState::OBJECT_LIBRARY) ||
-       ((*t)->GetType() == cmState::UTILITY))
+    if((t->second->GetType() == cmState::EXECUTABLE) ||
+       (t->second->GetType() == cmState::STATIC_LIBRARY) ||
+       (t->second->GetType() == cmState::SHARED_LIBRARY) ||
+       (t->second->GetType() == cmState::MODULE_LIBRARY) ||
+       (t->second->GetType() == cmState::OBJECT_LIBRARY) ||
+       (t->second->GetType() == cmState::UTILITY))
       {
-      emitted.insert((*t)->GetName());
+      emitted.insert(t->second->GetName());
 
       // for subdirs add a rule to build this specific target by name.
-      localName = this->GetRelativeTargetDirectory(*t);
+      localName = this->GetRelativeTargetDirectory(t->second);
       localName += "/rule";
       commands.clear();
       depends.clear();
@@ -449,23 +449,23 @@ void cmLocalUnixMakefileGenerator3
                           localName, depends, commands, true);
 
       // Add a target with the canonical name (no prefix, suffix or path).
-      if(localName != (*t)->GetName())
+      if(localName != t->second->GetName())
         {
         commands.clear();
         depends.push_back(localName);
         this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
-                            (*t)->GetName(), depends, commands, true);
+                            t->second->GetName(), depends, commands, true);
         }
 
       // Add a fast rule to build the target
       std::string makefileName =
-                         this->GetRelativeTargetDirectory(*t);
+                         this->GetRelativeTargetDirectory(t->second);
       makefileName += "/build.make";
       // make sure the makefile name is suitable for a makefile
       std::string makeTargetName =
-        this->GetRelativeTargetDirectory(*t);
+        this->GetRelativeTargetDirectory(t->second);
       makeTargetName += "/build";
-      localName = (*t)->GetName();
+      localName = t->second->GetName();
       localName += "/fast";
       depends.clear();
       commands.clear();
@@ -479,11 +479,11 @@ void cmLocalUnixMakefileGenerator3
 
       // Add a local name for the rule to relink the target before
       // installation.
-      if((*t)->NeedRelinkBeforeInstall(this->ConfigName))
+      if(t->second->NeedRelinkBeforeInstall(this->ConfigName))
         {
-        makeTargetName = this->GetRelativeTargetDirectory(*t);
+        makeTargetName = this->GetRelativeTargetDirectory(t->second);
         makeTargetName += "/preinstall";
-        localName = (*t)->GetName();
+        localName = t->second->GetName();
         localName += "/preinstall";
         depends.clear();
         commands.clear();
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 225c03e..16b8942 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -895,7 +895,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
                                 commandLines, false, autogenComment.c_str());
 
     cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
-    lg->AddGeneratorTarget(gt);
+    lg->AddGeneratorTarget(autogenTarget, gt);
     lg->GetGlobalGenerator()->AddGeneratorTarget(autogenTarget, gt);
 
     // Set target folder

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

Summary of changes:
 Source/cmExtraEclipseCDT4Generator.cxx    |    6 ++--
 Source/cmGlobalGenerator.cxx              |    2 +-
 Source/cmGlobalKdevelopGenerator.cxx      |   11 +++----
 Source/cmGlobalUnixMakefileGenerator3.cxx |   18 +++++------
 Source/cmGlobalVisualStudio8Generator.cxx |    2 +-
 Source/cmGlobalXCodeGenerator.cxx         |    4 +--
 Source/cmLocalGenerator.cxx               |   22 ++++++-------
 Source/cmLocalGenerator.h                 |    6 ++--
 Source/cmLocalGhsMultiGenerator.cxx       |   10 +++---
 Source/cmLocalNinjaGenerator.cxx          |   12 +++----
 Source/cmLocalUnixMakefileGenerator3.cxx  |   50 ++++++++++++++---------------
 Source/cmQtAutoGeneratorInitializer.cxx   |    2 +-
 12 files changed, 72 insertions(+), 73 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list