[Cmake-commits] CMake branch, next, updated. v3.3.1-2401-g284bfd6

Stephen Kelly steveire at gmail.com
Mon Aug 24 14:11:34 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  284bfd60c02a99c4da5a5b51a8ae39f3ca926fdf (commit)
       via  867b5be8b89c9b4f18ea604e1c61a154d0335c4c (commit)
       via  6c832219eadb6062c5026817ed86b81e583c8e5d (commit)
       via  3fcf383763e80b90e30fa06b29e0751ca19ab983 (commit)
       via  223f4a662fbe2caff92186e0875737fe3727a4fd (commit)
       via  ae026f5458c5c919031a41310321ae26cd56fae0 (commit)
      from  300f3e937c0739efaaac7a3a1ddd1931cf0e6841 (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=284bfd60c02a99c4da5a5b51a8ae39f3ca926fdf
commit 284bfd60c02a99c4da5a5b51a8ae39f3ca926fdf
Merge: 300f3e9 867b5be
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Aug 24 14:11:33 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Aug 24 14:11:33 2015 -0400

    Merge topic 'rm-cmLocalGenerator-Children' into next
    
    867b5be8 cmLocalGenerator: Remove unused Children member.
    6c832219 cmLocalGenerator: Implement child traversal in terms of cmState.
    3fcf3837 Makefiles: Remove valueless cast.
    223f4a66 cmLocalGenerator: Simplify condition.
    ae026f54 cmState: Store Children states in parent state.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=867b5be8b89c9b4f18ea604e1c61a154d0335c4c
commit 867b5be8b89c9b4f18ea604e1c61a154d0335c4c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jul 19 16:38:55 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:05:38 2015 +0200

    cmLocalGenerator: Remove unused Children member.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 9344f1d..b3fe3b0 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -50,10 +50,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
   assert(snapshot.IsValid());
   this->GlobalGenerator = gg;
   this->Parent = parent;
-  if (parent)
-    {
-    parent->AddChild(this);
-    }
 
   this->Makefile = new cmMakefile(this);
 
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 1c18788..915814b 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -89,11 +89,6 @@ public:
   ///! set/get the parent generator
   cmLocalGenerator* GetParent() const {return this->Parent;}
 
-  ///! set/get the children
-  void AddChild(cmLocalGenerator* g) { this->Children.push_back(g); }
-  std::vector<cmLocalGenerator*>& GetChildren() { return this->Children; }
-
-
   void AddArchitectureFlags(std::string& flags,
                             cmGeneratorTarget const* target,
                             const std::string&lang, const std::string& config);
@@ -349,7 +344,6 @@ protected:
   cmState::Snapshot StateSnapshot;
   cmGlobalGenerator *GlobalGenerator;
   cmLocalGenerator* Parent;
-  std::vector<cmLocalGenerator*> Children;
   std::map<std::string, std::string> UniqueObjectNamesMap;
   std::string::size_type ObjectPathMax;
   std::set<std::string> ObjectMaxPathViolations;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c832219eadb6062c5026817ed86b81e583c8e5d
commit 6c832219eadb6062c5026817ed86b81e583c8e5d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jul 19 16:33:54 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:05:37 2015 +0200

    cmLocalGenerator: Implement child traversal in terms of cmState.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index d951c13..fd7c768 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -495,10 +495,12 @@ cmGlobalUnixMakefileGenerator3
 
   // The directory-level rule should depend on the directory-level
   // rules of the subdirectories.
-  for(std::vector<cmLocalGenerator*>::iterator sdi =
-        lg->GetChildren().begin(); sdi != lg->GetChildren().end(); ++sdi)
+  std::vector<cmState::Snapshot> children
+      = lg->GetMakefile()->GetStateSnapshot().GetChildren();
+  for(std::vector<cmState::Snapshot>::const_iterator
+        ci = children.begin(); ci != children.end(); ++ci)
     {
-    std::string subdir = (*sdi)->GetMakefile()->GetCurrentBinaryDirectory();
+    std::string subdir = ci->GetDirectory().GetCurrentBinary();
     subdir += "/";
     subdir += pass;
     depends.push_back(subdir);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index db464d6..9344f1d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -200,12 +200,13 @@ void cmLocalGenerator::GenerateTestFiles()
     (*gi)->Generate(fout, config, configurationTypes);
     }
   size_t i;
-  for(i = 0; i < this->Children.size(); ++i)
+  std::vector<cmState::Snapshot> children
+      = this->Makefile->GetStateSnapshot().GetChildren();
+  for(i = 0; i < children.size(); ++i)
     {
     // TODO: Use add_subdirectory instead?
     fout << "subdirs(";
-    std::string outP =
-      this->Children[i]->GetMakefile()->GetCurrentBinaryDirectory();
+    std::string outP = children[i].GetDirectory().GetCurrentBinary();
     fout << this->Convert(outP,START_OUTPUT);
     fout << ")" << std::endl;
     }
@@ -413,16 +414,18 @@ void cmLocalGenerator::GenerateInstallRules()
   this->GenerateTargetInstallRules(fout, config, configurationTypes);
 
   // Include install scripts from subdirectories.
-  if(!this->Children.empty())
+  std::vector<cmState::Snapshot> children
+      = this->Makefile->GetStateSnapshot().GetChildren();
+  if(!children.empty())
     {
     fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
     fout << "  # Include the install script for each subdirectory.\n";
-    for(std::vector<cmLocalGenerator*>::const_iterator
-          ci = this->Children.begin(); ci != this->Children.end(); ++ci)
+    for(std::vector<cmState::Snapshot>::const_iterator
+          ci = children.begin(); ci != children.end(); ++ci)
       {
-      if(!(*ci)->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
+      if(!ci->GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL"))
         {
-        std::string odir = (*ci)->GetMakefile()->GetCurrentBinaryDirectory();
+        std::string odir = ci->GetDirectory().GetCurrentBinary();
         cmSystemTools::ConvertToUnixSlashes(odir);
         fout << "  include(\"" <<  odir
              << "/cmake_install.cmake\")" << std::endl;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fcf383763e80b90e30fa06b29e0751ca19ab983
commit 3fcf383763e80b90e30fa06b29e0751ca19ab983
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jul 19 16:35:36 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:05:37 2015 +0200

    Makefiles: Remove valueless cast.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index b240924..d951c13 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -498,9 +498,7 @@ cmGlobalUnixMakefileGenerator3
   for(std::vector<cmLocalGenerator*>::iterator sdi =
         lg->GetChildren().begin(); sdi != lg->GetChildren().end(); ++sdi)
     {
-    cmLocalUnixMakefileGenerator3* slg =
-      static_cast<cmLocalUnixMakefileGenerator3*>(*sdi);
-    std::string subdir = slg->GetMakefile()->GetCurrentBinaryDirectory();
+    std::string subdir = (*sdi)->GetMakefile()->GetCurrentBinaryDirectory();
     subdir += "/";
     subdir += pass;
     depends.push_back(subdir);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=223f4a662fbe2caff92186e0875737fe3727a4fd
commit 223f4a662fbe2caff92186e0875737fe3727a4fd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jul 19 16:31:10 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:05:37 2015 +0200

    cmLocalGenerator: Simplify condition.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index edb644d..db464d6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -199,18 +199,15 @@ void cmLocalGenerator::GenerateTestFiles()
     (*gi)->Compute(this);
     (*gi)->Generate(fout, config, configurationTypes);
     }
-  if (!this->Children.empty())
-    {
-    size_t i;
-    for(i = 0; i < this->Children.size(); ++i)
-      {
-      // TODO: Use add_subdirectory instead?
-      fout << "subdirs(";
-      std::string outP =
-        this->Children[i]->GetMakefile()->GetCurrentBinaryDirectory();
-      fout << this->Convert(outP,START_OUTPUT);
-      fout << ")" << std::endl;
-      }
+  size_t i;
+  for(i = 0; i < this->Children.size(); ++i)
+    {
+    // TODO: Use add_subdirectory instead?
+    fout << "subdirs(";
+    std::string outP =
+      this->Children[i]->GetMakefile()->GetCurrentBinaryDirectory();
+    fout << this->Convert(outP,START_OUTPUT);
+    fout << ")" << std::endl;
     }
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae026f5458c5c919031a41310321ae26cd56fae0
commit ae026f5458c5c919031a41310321ae26cd56fae0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jul 19 16:26:49 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Aug 24 20:05:37 2015 +0200

    cmState: Store Children states in parent state.

diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 53fdae0..3df855a 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -76,6 +76,8 @@ struct cmState::BuildsystemDirectoryStateType
   std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
 
   cmPropertyMap Properties;
+
+  std::vector<cmState::Snapshot> Children;
 };
 
 cmState::cmState(cmake* cm)
@@ -274,6 +276,7 @@ cmState::Snapshot cmState::Reset()
   it->CompileOptionsBacktraces.clear();
   it->DirectoryEnd = pos;
   it->Properties.clear();
+  it->Children.clear();
   }
 
   this->PolicyStack.Clear();
@@ -800,7 +803,9 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
   pos->Parent = origin;
   pos->Root = origin;
   pos->Vars = this->VarTree.Extend(origin);
-  return cmState::Snapshot(this, pos);
+  cmState::Snapshot snapshot = cmState::Snapshot(this, pos);
+  originSnapshot.Position->BuildSystemDirectory->Children.push_back(snapshot);
+  return snapshot;
 }
 
 cmState::Snapshot
@@ -938,6 +943,11 @@ cmState::Snapshot::Snapshot(cmState* state)
 {
 }
 
+std::vector<cmState::Snapshot> cmState::Snapshot::GetChildren()
+{
+  return this->Position->BuildSystemDirectory->Children;
+}
+
 cmState::Snapshot::Snapshot(cmState* state, PositionType position)
   : State(state),
   Position(position)
diff --git a/Source/cmState.h b/Source/cmState.h
index e503cd2..a488c62 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -65,6 +65,8 @@ public:
     void SetListFile(std::string const& listfile);
 
     std::string GetExecutionListFile() const;
+
+    std::vector<Snapshot> GetChildren();
     std::string GetEntryPointCommand() const;
     long GetEntryPointLine() const;
 

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

Summary of changes:
 Source/cmGlobalUnixMakefileGenerator3.cxx |   10 ++++----
 Source/cmLocalGenerator.cxx               |   36 +++++++++++++----------------
 Source/cmLocalGenerator.h                 |    6 -----
 Source/cmState.cxx                        |   12 +++++++++-
 Source/cmState.h                          |    2 ++
 5 files changed, 34 insertions(+), 32 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list