[Cmake-commits] CMake branch, next, updated. v3.3.2-1433-g8a2fb65

Stephen Kelly steveire at gmail.com
Mon Oct 5 12:43:51 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  8a2fb65090dd95053d3d5e24e645868530355636 (commit)
       via  616f03114eb41218dc3278e72b52d8de09e40365 (commit)
       via  9eea0486bfe5dfd497e6a8fca9e3c2551169c24e (commit)
       via  2eca0559881c36061f84ea4fcd955ac32d9d427a (commit)
       via  21f428f4c0adf7045e852be30739cd1243aa96fe (commit)
       via  a9588e90bbddbfe71b1d33d63d38eedaf397023f (commit)
       via  4407eee01365d89d370d8e8b89f3ec0a65420046 (commit)
       via  a09c545d3a518d771b66b59f92821af3d55d7d4b (commit)
      from  e72bb585d8cb967d0471f3d5067cce0784054340 (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=8a2fb65090dd95053d3d5e24e645868530355636
commit 8a2fb65090dd95053d3d5e24e645868530355636
Merge: e72bb58 616f031
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Oct 5 12:43:50 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 5 12:43:50 2015 -0400

    Merge topic 'refactor-computation' into next
    
    616f0311 cmGlobalGenerator: Move path computation to Compute.
    9eea0486 cmGlobalGenerator: Do more computation at compute time.
    2eca0559 cmGlobalGenerator: De-virtualize Compute().
    21f428f4 VisualStudio: Replace Compute override with AddExtraIDETargets override.
    a9588e90 VisualStudio10: Initialize the LongestSource at generate time.
    4407eee0 cmGlobalGenerator: Call AddExtraIDETargets as a hook of Compute().
    a09c545d Xcode: Extract a AddExtraIDETargets method.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=616f03114eb41218dc3278e72b52d8de09e40365
commit 616f03114eb41218dc3278e72b52d8de09e40365
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 29 09:22:09 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 5 18:43:18 2015 +0200

    cmGlobalGenerator: Move path computation to Compute.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cae5466..3d073ca 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1305,26 +1305,24 @@ bool cmGlobalGenerator::Compute()
     return false;
     }
 
+  for (i = 0; i < this->LocalGenerators.size(); ++i)
+    {
+    this->LocalGenerators[i]->ComputeHomeRelativeOutputPath();
+    }
+
   return true;
 }
 
 void cmGlobalGenerator::Generate()
 {
-  unsigned int i;
-
   // Create a map from local generator to the complete set of targets
   // it builds by default.
   this->InitializeProgressMarks();
 
   this->ProcessEvaluationFiles();
 
-  for (i = 0; i < this->LocalGenerators.size(); ++i)
-    {
-    this->LocalGenerators[i]->ComputeHomeRelativeOutputPath();
-    }
-
   // Generate project files
-  for (i = 0; i < this->LocalGenerators.size(); ++i)
+  for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
     {
     this->SetCurrentMakefile(this->LocalGenerators[i]->GetMakefile());
     this->LocalGenerators[i]->Generate();

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9eea0486bfe5dfd497e6a8fca9e3c2551169c24e
commit 9eea0486bfe5dfd497e6a8fca9e3c2551169c24e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 29 09:21:32 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 5 18:43:18 2015 +0200

    cmGlobalGenerator: Do more computation at compute time.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 27f860e..cae5466 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1284,13 +1284,6 @@ bool cmGlobalGenerator::Compute()
 
   this->AddExtraIDETargets();
 
-  return true;
-}
-
-void cmGlobalGenerator::Generate()
-{
-  unsigned int i;
-
   // Trace the dependencies, after that no custom commands should be added
   // because their dependencies might not be handled correctly
   for (i = 0; i < this->LocalGenerators.size(); ++i)
@@ -1309,9 +1302,16 @@ void cmGlobalGenerator::Generate()
   // Compute the inter-target dependencies.
   if(!this->ComputeTargetDepends())
     {
-    return;
+    return false;
     }
 
+  return true;
+}
+
+void cmGlobalGenerator::Generate()
+{
+  unsigned int i;
+
   // Create a map from local generator to the complete set of targets
   // it builds by default.
   this->InitializeProgressMarks();

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2eca0559881c36061f84ea4fcd955ac32d9d427a
commit 2eca0559881c36061f84ea4fcd955ac32d9d427a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 15 20:50:11 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 5 18:43:18 2015 +0200

    cmGlobalGenerator: De-virtualize Compute().
    
    It now implements the NVI pattern.

diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index e73aac2..f233f1d 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -83,7 +83,7 @@ public:
    */
   virtual void Configure();
 
-  virtual bool Compute();
+  bool Compute();
   virtual void AddExtraIDETargets() {}
 
   enum TargetTypes {

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21f428f4c0adf7045e852be30739cd1243aa96fe
commit 21f428f4c0adf7045e852be30739cd1243aa96fe
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 15 20:47:35 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 5 18:43:18 2015 +0200

    VisualStudio: Replace Compute override with AddExtraIDETargets override.

diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 70c00e9..86a8f87 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -348,13 +348,9 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
 }
 
 //----------------------------------------------------------------------------
-bool cmGlobalVisualStudio8Generator::Compute()
+void cmGlobalVisualStudio8Generator::AddExtraIDETargets()
 {
-  if (!cmGlobalVisualStudio7Generator::Compute())
-    {
-    return false;
-    }
-
+  cmGlobalVisualStudio7Generator::AddExtraIDETargets();
   if(this->AddCheckTarget())
     {
     // All targets depend on the build-system check target.
@@ -368,7 +364,6 @@ bool cmGlobalVisualStudio8Generator::Compute()
         }
       }
     }
-  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index 1c61103..9d6c64f 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -67,7 +67,7 @@ public:
     return !this->WindowsCEVersion.empty(); }
 
 protected:
-  virtual bool Compute();
+  virtual void AddExtraIDETargets();
   virtual const char* GetIDEVersion() { return "8.0"; }
 
   virtual std::string FindDevEnvCommand();
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 7552d67..d45aa27 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -64,13 +64,8 @@ std::string cmGlobalVisualStudioGenerator::GetRegistryBase(
 }
 
 //----------------------------------------------------------------------------
-bool cmGlobalVisualStudioGenerator::Compute()
+void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
 {
-  if (!cmGlobalGenerator::Compute())
-    {
-    return false;
-    }
-
   // Add a special target that depends on ALL projects for easy build
   // of one configuration only.
   const char* no_working_dir = 0;
@@ -144,7 +139,6 @@ bool cmGlobalVisualStudioGenerator::Compute()
       static_cast<cmLocalVisualStudioGenerator*>(*lgi);
     lg->AddCMakeListsRules();
     }
-  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index c940eb3..41d0b88 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -111,7 +111,7 @@ public:
     cmGeneratorTarget*, std::vector<cmCustomCommand>& commands,
     std::string const& configName);
 protected:
-  virtual bool Compute();
+  virtual void AddExtraIDETargets();
 
   // Does this VS version link targets to each other if there are
   // dependencies in the SLN file?  This was done for VS versions

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9588e90bbddbfe71b1d33d63d38eedaf397023f
commit a9588e90bbddbfe71b1d33d63d38eedaf397023f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 15 20:48:41 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 5 18:43:17 2015 +0200

    VisualStudio10: Initialize the LongestSource at generate time.
    
    There is no need to initialize it at compute time.

diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 59e8f8c..161b532 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -325,19 +325,9 @@ cmLocalGenerator* cmGlobalVisualStudio10Generator::CreateLocalGenerator(
   return new cmLocalVisualStudio10Generator(this, mf);
 }
 
-//----------------------------------------------------------------------------
-bool cmGlobalVisualStudio10Generator::Compute()
-{
-  if (!cmGlobalVisualStudio8Generator::Compute())
-    {
-    return false;
-    }
-  this->LongestSource = LongestSourcePath();
-  return true;
-}
-
 void cmGlobalVisualStudio10Generator::Generate()
 {
+  this->LongestSource = LongestSourcePath();
   this->cmGlobalVisualStudio8Generator::Generate();
   if(this->LongestSource.Length > 0)
     {
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index f4861dc..7600a0d 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -45,8 +45,6 @@ public:
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
-  virtual bool Compute();
-
   ///! create the correct local generator
   virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4407eee01365d89d370d8e8b89f3ec0a65420046
commit 4407eee01365d89d370d8e8b89f3ec0a65420046
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 15 20:37:57 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 5 18:43:17 2015 +0200

    cmGlobalGenerator: Call AddExtraIDETargets as a hook of Compute().
    
    Relieve the Xcode generator of having to reimplement Compute().

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4a48b5d..27f860e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1282,6 +1282,8 @@ bool cmGlobalGenerator::Compute()
       }
     }
 
+  this->AddExtraIDETargets();
+
   return true;
 }
 
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index ba74c9e..e73aac2 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -84,6 +84,7 @@ public:
   virtual void Configure();
 
   virtual bool Compute();
+  virtual void AddExtraIDETargets() {}
 
   enum TargetTypes {
     AllTargets,
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e209b64..746e1a7 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -376,17 +376,6 @@ cmGlobalXCodeGenerator::CreateLocalGenerator(cmMakefile* mf)
   return new cmLocalXCodeGenerator(this, mf);
 }
 
-//----------------------------------------------------------------------------
-bool cmGlobalXCodeGenerator::Compute()
-{
-  if (!cmGlobalGenerator::Compute())
-    {
-      return false;
-    }
-  this->AddExtraIDETargets();
-  return true;
-}
-
 void cmGlobalXCodeGenerator::AddExtraIDETargets()
 {
   std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it;
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 413a7bc..9daf0ab 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -87,8 +87,7 @@ public:
   virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf);
   void AppendFlag(std::string& flags, std::string const& flag);
 protected:
-  virtual bool Compute();
-  void AddExtraIDETargets();
+  virtual void AddExtraIDETargets();
   virtual void Generate();
 private:
   cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget,

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a09c545d3a518d771b66b59f92821af3d55d7d4b
commit a09c545d3a518d771b66b59f92821af3d55d7d4b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 15 20:36:02 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 5 18:43:17 2015 +0200

    Xcode: Extract a AddExtraIDETargets method.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 33babec..e209b64 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -383,7 +383,12 @@ bool cmGlobalXCodeGenerator::Compute()
     {
       return false;
     }
+  this->AddExtraIDETargets();
+  return true;
+}
 
+void cmGlobalXCodeGenerator::AddExtraIDETargets()
+{
   std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it;
   // make sure extra targets are added before calling
   // the parent generate which will call trace depends
@@ -394,7 +399,6 @@ bool cmGlobalXCodeGenerator::Compute()
     // add ALL_BUILD, INSTALL, etc
     this->AddExtraTargets(root, it->second);
     }
-  return true;
 }
 
 void cmGlobalXCodeGenerator::Generate()
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 102c036..413a7bc 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -88,6 +88,7 @@ public:
   void AppendFlag(std::string& flags, std::string const& flag);
 protected:
   virtual bool Compute();
+  void AddExtraIDETargets();
   virtual void Generate();
 private:
   cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget,

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

Summary of changes:
 Source/cmGlobalGenerator.cxx               |   26 +++++++++++++-------------
 Source/cmGlobalGenerator.h                 |    3 ++-
 Source/cmGlobalVisualStudio10Generator.cxx |   12 +-----------
 Source/cmGlobalVisualStudio10Generator.h   |    2 --
 Source/cmGlobalVisualStudio8Generator.cxx  |    9 ++-------
 Source/cmGlobalVisualStudio8Generator.h    |    2 +-
 Source/cmGlobalVisualStudioGenerator.cxx   |    8 +-------
 Source/cmGlobalVisualStudioGenerator.h     |    2 +-
 Source/cmGlobalXCodeGenerator.cxx          |    9 +--------
 Source/cmGlobalXCodeGenerator.h            |    2 +-
 10 files changed, 23 insertions(+), 52 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list