[Cmake-commits] CMake branch, next, updated. v3.3.1-2339-g456ea8c

Stephen Kelly steveire at gmail.com
Sun Aug 23 11:47:22 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  456ea8c2a62f646f3b0192273cb49d8462f8ce02 (commit)
       via  1f39ee5bebf66aac33e7e1fa1172c048c13dfd2d (commit)
       via  c259b8302648de1387e21e9ea907cd1a2cb49933 (commit)
       via  75e511eeaf77848ffef00d570cb10243764f51d2 (commit)
      from  27ebbf3f4ed8b79fbe7c2c01c5faf43a242a52a1 (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=456ea8c2a62f646f3b0192273cb49d8462f8ce02
commit 456ea8c2a62f646f3b0192273cb49d8462f8ce02
Merge: 27ebbf3 1f39ee5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 23 11:47:21 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Aug 23 11:47:21 2015 -0400

    Merge topic 'generators-use-cmLocalGenerator' into next
    
    1f39ee5b cmInstallExportGenerator: Require cmLocalGenerator, not cmMakefile.
    c259b830 cmTestGenerator: Require cmLocalGenerator, not cmMakefile.
    75e511ee cmInstallFilesGenerator: Require cmLocalGenerator, not cmMakefile.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f39ee5bebf66aac33e7e1fa1172c048c13dfd2d
commit 1f39ee5bebf66aac33e7e1fa1172c048c13dfd2d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 5 23:05:22 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 17:46:23 2015 +0200

    cmInstallExportGenerator: Require cmLocalGenerator, not cmMakefile.

diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index d55be11..7ffab0c 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -72,8 +72,8 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
 
   // Set an _IMPORT_PREFIX variable for import location properties
   // to reference if they are relative to the install prefix.
-  std::string installPrefix =
-    this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
+  std::string installPrefix = this->IEGen->GetLocalGenerator()
+      ->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
   std::string const& expDest = this->IEGen->GetDestination();
   if(cmSystemTools::FileIsFullPath(expDest))
     {
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index e22dc42..333c2ff 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -1406,7 +1406,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
       ica.GetDestination().c_str(),
       ica.GetPermissions().c_str(), ica.GetConfigurations(),
       ica.GetComponent().c_str(), message, fname.c_str(),
-      name_space.GetCString(), exportOld.IsEnabled(), this->Makefile);
+      name_space.GetCString(), exportOld.IsEnabled());
   this->Makefile->AddInstallGenerator(exportGenerator);
 
   return true;
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index 7f6aa4d..97b9405 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -34,15 +34,14 @@ cmInstallExportGenerator::cmInstallExportGenerator(
   const char* component,
   MessageLevel message,
   const char* filename, const char* name_space,
-  bool exportOld,
-  cmMakefile* mf)
+  bool exportOld)
   :cmInstallGenerator(destination, configurations, component, message)
   ,ExportSet(exportSet)
   ,FilePermissions(file_permissions)
   ,FileName(filename)
   ,Namespace(name_space)
   ,ExportOld(exportOld)
-  ,Makefile(mf)
+  ,LocalGenerator(0)
 {
   this->EFGen = new cmExportInstallFileGenerator(this);
   exportSet->AddInstallation(this);
@@ -54,12 +53,18 @@ cmInstallExportGenerator::~cmInstallExportGenerator()
   delete this->EFGen;
 }
 
+void cmInstallExportGenerator::Compute(cmLocalGenerator* lg)
+{
+  this->LocalGenerator = lg;
+}
+
 //----------------------------------------------------------------------------
 void cmInstallExportGenerator::ComputeTempDir()
 {
   // Choose a temporary directory in which to generate the import
   // files to be installed.
-  this->TempDir = this->Makefile->GetCurrentBinaryDirectory();
+  this->TempDir =
+      this->LocalGenerator->GetMakefile()->GetCurrentBinaryDirectory();
   this->TempDir += cmake::GetCMakeFilesDirectory();
   this->TempDir += "/Export";
   if(this->Destination.empty())
diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h
index 3e078f2..885ed05 100644
--- a/Source/cmInstallExportGenerator.h
+++ b/Source/cmInstallExportGenerator.h
@@ -32,12 +32,14 @@ public:
                            const char* component,
                            MessageLevel message,
                            const char* filename, const char* name_space,
-                           bool exportOld, cmMakefile* mf);
+                           bool exportOld);
   ~cmInstallExportGenerator();
 
   cmExportSet* GetExportSet() {return this->ExportSet;}
 
-  cmMakefile* GetMakefile() const { return this->Makefile; }
+  void Compute(cmLocalGenerator* lg);
+
+  cmLocalGenerator* GetLocalGenerator() const { return this->LocalGenerator; }
 
   const std::string& GetNamespace() const { return this->Namespace; }
 
@@ -57,7 +59,7 @@ protected:
   std::string FileName;
   std::string Namespace;
   bool ExportOld;
-  cmMakefile* Makefile;
+  cmLocalGenerator* LocalGenerator;
 
   std::string TempDir;
   std::string MainImportFile;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c259b8302648de1387e21e9ea907cd1a2cb49933
commit c259b8302648de1387e21e9ea907cd1a2cb49933
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Aug 5 21:03:26 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 17:46:07 2015 +0200

    cmTestGenerator: Require cmLocalGenerator, not cmMakefile.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a831d88..edb644d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -196,6 +196,7 @@ void cmLocalGenerator::GenerateTestFiles()
   for(std::vector<cmTestGenerator*>::const_iterator gi = testers.begin();
       gi != testers.end(); ++gi)
     {
+    (*gi)->Compute(this);
     (*gi)->Generate(fout, config, configurationTypes);
     }
   if (!this->Children.empty())
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index 1815ade..9d85f5a 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -14,6 +14,7 @@
 #include "cmGeneratorExpression.h"
 #include "cmOutputConverter.h"
 #include "cmMakefile.h"
+#include "cmLocalGenerator.h"
 #include "cmSystemTools.h"
 #include "cmTarget.h"
 #include "cmTest.h"
@@ -27,6 +28,7 @@ cmTestGenerator
 {
   this->ActionsPerConfig = !test->GetOldStyle();
   this->TestGenerated = false;
+  this->LG = 0;
 }
 
 //----------------------------------------------------------------------------
@@ -35,6 +37,11 @@ cmTestGenerator
 {
 }
 
+void cmTestGenerator::Compute(cmLocalGenerator* lg)
+{
+  this->LG = lg;
+}
+
 //----------------------------------------------------------------------------
 void cmTestGenerator::GenerateScriptConfigs(std::ostream& os,
                                             Indent const& indent)
@@ -81,8 +88,8 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
   // Check whether the command executable is a target whose name is to
   // be translated.
   std::string exe = command[0];
-  cmMakefile* mf = this->Test->GetMakefile();
-  cmGeneratorTarget* target = mf->FindGeneratorTargetToUse(exe);
+  cmGeneratorTarget* target =
+      this->LG->GetMakefile()->FindGeneratorTargetToUse(exe);
   if(target && target->GetType() == cmTarget::EXECUTABLE)
     {
     // Use the target file on disk.
@@ -110,7 +117,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
   else
     {
     // Use the command name given.
-    exe = ge.Parse(exe.c_str())->Evaluate(mf, config);
+    exe = ge.Parse(exe.c_str())->Evaluate(this->LG->GetMakefile(), config);
     cmSystemTools::ConvertToUnixSlashes(exe);
     }
 
@@ -120,7 +127,8 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
       ci != command.end(); ++ci)
     {
     os << " " << cmOutputConverter::EscapeForCMake(
-                                         ge.Parse(*ci)->Evaluate(mf, config));
+                                         ge.Parse(*ci)->Evaluate(
+                                            this->LG->GetMakefile(), config));
     }
 
   // Finish the test command.
@@ -137,7 +145,8 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
       {
       os << " " << i->first
          << " " << cmOutputConverter::EscapeForCMake(
-           ge.Parse(i->second.GetValue())->Evaluate(mf, config));
+           ge.Parse(i->second.GetValue())->Evaluate(this->LG->GetMakefile(),
+                                                    config));
       }
     os << ")" << std::endl;
     }
diff --git a/Source/cmTestGenerator.h b/Source/cmTestGenerator.h
index 5446553..de8ab78 100644
--- a/Source/cmTestGenerator.h
+++ b/Source/cmTestGenerator.h
@@ -15,6 +15,7 @@
 #include "cmScriptGenerator.h"
 
 class cmTest;
+class cmLocalGenerator;
 
 /** \class cmTestGenerator
  * \brief Support class for generating install scripts.
@@ -28,6 +29,8 @@ public:
                   configurations = std::vector<std::string>());
   virtual ~cmTestGenerator();
 
+  void Compute(cmLocalGenerator* lg);
+
 protected:
   virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
   virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
@@ -38,6 +41,7 @@ protected:
   virtual bool NeedsScriptNoConfig() const;
   void GenerateOldStyle(std::ostream& os, Indent const& indent);
 
+  cmLocalGenerator* LG;
   cmTest* Test;
   bool TestGenerated;
 };

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75e511eeaf77848ffef00d570cb10243764f51d2
commit 75e511eeaf77848ffef00d570cb10243764f51d2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Aug 1 09:01:03 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Aug 23 17:21:27 2015 +0200

    cmInstallFilesGenerator: Require cmLocalGenerator, not cmMakefile.

diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index f548f5d..e22dc42 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -42,7 +42,7 @@ static cmInstallFilesGenerator* CreateInstallFilesGenerator(
 {
   cmInstallGenerator::MessageLevel message =
     cmInstallGenerator::SelectMessageLevel(mf);
-  return new cmInstallFilesGenerator(mf,
+  return new cmInstallFilesGenerator(
                         absFiles, args.GetDestination().c_str(),
                         programs, args.GetPermissions().c_str(),
                         args.GetConfigurations(), args.GetComponent().c_str(),
diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx
index 508c373..68557bd 100644
--- a/Source/cmInstallFilesCommand.cxx
+++ b/Source/cmInstallFilesCommand.cxx
@@ -128,7 +128,7 @@ void cmInstallFilesCommand::CreateInstallGenerator() const
   cmInstallGenerator::MessageLevel message =
     cmInstallGenerator::SelectMessageLevel(this->Makefile);
   this->Makefile->AddInstallGenerator(
-    new cmInstallFilesGenerator(this->Makefile, this->Files,
+    new cmInstallFilesGenerator(this->Files,
                                 destination.c_str(), false,
                                 no_permissions, no_configurations,
                                 no_component.c_str(), message, no_rename));
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index ff2c6e5..c18b174 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -14,11 +14,11 @@
 #include "cmGeneratorExpression.h"
 #include "cmMakefile.h"
 #include "cmSystemTools.h"
+#include "cmLocalGenerator.h"
 
 //----------------------------------------------------------------------------
 cmInstallFilesGenerator
-::cmInstallFilesGenerator(cmMakefile* mf,
-                          std::vector<std::string> const& files,
+::cmInstallFilesGenerator(std::vector<std::string> const& files,
                           const char* dest, bool programs,
                           const char* file_permissions,
                           std::vector<std::string> const& configurations,
@@ -27,7 +27,7 @@ cmInstallFilesGenerator
                           const char* rename,
                           bool optional):
   cmInstallGenerator(dest, configurations, component, message),
-  Makefile(mf),
+  LocalGenerator(0),
   Files(files),
   FilePermissions(file_permissions),
   Rename(rename),
@@ -51,6 +51,11 @@ cmInstallFilesGenerator
 {
 }
 
+void cmInstallFilesGenerator::Compute(cmLocalGenerator* lg)
+{
+  this->LocalGenerator = lg;
+}
+
 //----------------------------------------------------------------------------
 void cmInstallFilesGenerator::AddFilesInstallRule(
   std::ostream& os, Indent const& indent,
@@ -94,8 +99,8 @@ void cmInstallFilesGenerator::GenerateScriptForConfig(std::ostream& os,
       i != this->Files.end(); ++i)
     {
     cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i);
-    cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, config),
-                                      files);
+    cmSystemTools::ExpandListArgument(cge->Evaluate(
+        this->LocalGenerator->GetMakefile(), config), files);
     }
   this->AddFilesInstallRule(os, indent, files);
 }
diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h
index bf482d6..00b3a79 100644
--- a/Source/cmInstallFilesGenerator.h
+++ b/Source/cmInstallFilesGenerator.h
@@ -14,16 +14,13 @@
 
 #include "cmInstallGenerator.h"
 
-class cmMakefile;
-
 /** \class cmInstallFilesGenerator
  * \brief Generate file installation rules.
  */
 class cmInstallFilesGenerator: public cmInstallGenerator
 {
 public:
-  cmInstallFilesGenerator(cmMakefile* mf,
-                          std::vector<std::string> const& files,
+  cmInstallFilesGenerator(std::vector<std::string> const& files,
                           const char* dest, bool programs,
                           const char* file_permissions,
                           std::vector<std::string> const& configurations,
@@ -33,6 +30,8 @@ public:
                           bool optional = false);
   virtual ~cmInstallFilesGenerator();
 
+  void Compute(cmLocalGenerator* lg);
+
 protected:
   virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
   virtual void GenerateScriptForConfig(std::ostream& os,
@@ -41,7 +40,7 @@ protected:
   void AddFilesInstallRule(std::ostream& os, Indent const& indent,
                            std::vector<std::string> const& files);
 
-  cmMakefile* Makefile;
+  cmLocalGenerator* LocalGenerator;
   std::vector<std::string> Files;
   std::string FilePermissions;
   std::string Rename;
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index be8096c..e6fbe88 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -91,7 +91,7 @@ void cmInstallProgramsCommand::FinalPass()
   cmInstallGenerator::MessageLevel message =
     cmInstallGenerator::SelectMessageLevel(this->Makefile);
   this->Makefile->AddInstallGenerator(
-    new cmInstallFilesGenerator(this->Makefile, this->Files,
+    new cmInstallFilesGenerator(this->Files,
                                 destination.c_str(), true,
                                 no_permissions, no_configurations,
                                 no_component.c_str(), message, no_rename));

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

Summary of changes:
 Source/cmExportInstallFileGenerator.cxx |    4 ++--
 Source/cmInstallCommand.cxx             |    4 ++--
 Source/cmInstallExportGenerator.cxx     |   13 +++++++++----
 Source/cmInstallExportGenerator.h       |    8 +++++---
 Source/cmInstallFilesCommand.cxx        |    2 +-
 Source/cmInstallFilesGenerator.cxx      |   15 ++++++++++-----
 Source/cmInstallFilesGenerator.h        |    9 ++++-----
 Source/cmInstallProgramsCommand.cxx     |    2 +-
 Source/cmLocalGenerator.cxx             |    1 +
 Source/cmTestGenerator.cxx              |   19 ++++++++++++++-----
 Source/cmTestGenerator.h                |    4 ++++
 11 files changed, 53 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list