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  bb1bffebea884264d5b789c70893606e8c2d7fc6 (commit)
       via  50b744d67de9a53b3c8b71ba4e496d032050403a (commit)
      from  f83e8cf401a89f8643567b2036b22f2ff4af0101 (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=bb1bffebea884264d5b789c70893606e8c2d7fc6
commit bb1bffebea884264d5b789c70893606e8c2d7fc6
Merge: f83e8cf 50b744d
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Jul 28 15:30:00 2015 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Jul 28 15:30:00 2015 -0400

    Merge topic 'refactor-install' into next
    
    50b744d6 Revert topic 'refactor-install'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50b744d67de9a53b3c8b71ba4e496d032050403a
commit 50b744d67de9a53b3c8b71ba4e496d032050403a
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Jul 28 15:29:36 2015 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Jul 28 15:29:36 2015 -0400

    Revert topic 'refactor-install'
    
    It fails to build on Windows and OS X.

diff --git a/Source/cmExportInstallFileGenerator.cxx 
b/Source/cmExportInstallFileGenerator.cxx
index 1d75f43..6c7d97e 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -398,7 +398,7 @@ cmExportInstallFileGenerator
     }
 
   // Get the target to be installed.
-  cmTarget* target = itgen->GetTarget()->Target;
+  cmTarget* target = itgen->GetTarget();
 
   // Construct the installed location of the target.
   std::string dest = itgen->GetDestination(config);
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index bd57b3d..edd89e8 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1150,35 +1150,35 @@ void cmGeneratorTarget::GenerateTargetManifest(
     f = dir;
     f += "/";
     f += name;
-    gg->AddToManifest(f);
+    gg->AddToManifest(config, f);
     }
   if(!soName.empty())
     {
     f = dir;
     f += "/";
     f += soName;
-    gg->AddToManifest(f);
+    gg->AddToManifest(config, f);
     }
   if(!realName.empty())
     {
     f = dir;
     f += "/";
     f += realName;
-    gg->AddToManifest(f);
+    gg->AddToManifest(config, f);
     }
   if(!pdbName.empty())
     {
     f = dir;
     f += "/";
     f += pdbName;
-    gg->AddToManifest(f);
+    gg->AddToManifest(config, f);
     }
   if(!impName.empty())
     {
     f = this->Target->GetDirectory(config, true);
     f += "/";
     f += impName;
-    gg->AddToManifest(f);
+    gg->AddToManifest(config, f);
     }
 }
 
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1d6608b..5599854 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -34,7 +34,6 @@
 #include "cmExportBuildFileGenerator.h"
 #include "cmCPackPropertiesGenerator.h"
 #include "cmAlgorithms.h"
-#include "cmInstallGenerator.h"
 
 #include <cmsys/Directory.hxx>
 #include <cmsys/FStream.hxx>
@@ -1213,7 +1212,7 @@ bool 
cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const
   return false;
 }
 
-bool cmGlobalGenerator::Compute()
+void cmGlobalGenerator::DoGenerate()
 {
   // Some generators track files replaced during the Generate.
   // Start with an empty vector:
@@ -1222,11 +1221,17 @@ bool cmGlobalGenerator::Compute()
   // clear targets to issue warning CMP0042 for
   this->CMP0042WarnTargets.clear();
 
+  this->Generate();
+}
+
+void cmGlobalGenerator::Generate()
+{
   // Check whether this generator is allowed to run.
   if(!this->CheckALLOW_DUPLICATE_CUSTOM_TARGETS())
     {
-    return false;
+    return;
     }
+
   this->FinalizeTargetCompileInfo();
 
   this->CreateGenerationObjects();
@@ -1261,24 +1266,6 @@ bool cmGlobalGenerator::Compute()
     }
 #endif
 
-  for (i = 0; i < this->LocalGenerators.size(); ++i)
-    {
-    cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
-    std::vector<cmInstallGenerator*>& gens = mf->GetInstallGenerators();
-    for (std::vector<cmInstallGenerator*>::const_iterator git = gens.begin();
-         git != gens.end(); ++git)
-      {
-      (*git)->Compute(this->LocalGenerators[i]);
-      }
-    }
-
-  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)
@@ -2711,8 +2698,12 @@ void 
cmGlobalGenerator::AddTargetDepends(cmGeneratorTarget const* target,
 
 
 //----------------------------------------------------------------------------
-void cmGlobalGenerator::AddToManifest(std::string const& f)
+void cmGlobalGenerator::AddToManifest(const std::string& config,
+                                      std::string const& f)
 {
+  // Add to the main manifest for this configuration.
+  this->TargetManifest[config].insert(f);
+
   // Add to the content listing for the file's directory.
   std::string dir = cmSystemTools::GetFilenamePath(f);
   std::string file = cmSystemTools::GetFilenameName(f);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 9492372..d486003 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -86,7 +86,6 @@ public:
    */
   virtual void Configure();
 
-  virtual bool Compute();
 
   enum TargetTypes {
     AllTargets,
@@ -100,7 +99,7 @@ public:
    * basically creates a series of LocalGenerators for each directory and
    * requests that they Generate.
    */
-  virtual void Generate();
+  void DoGenerate();
 
   /**
    * Set/Get and Clear the enabled languages.
@@ -201,7 +200,7 @@ public:
   cmExportSetMap& GetExportSets() {return this->ExportSets;}
 
   /** Add a file to the manifest of generated targets for a configuration.  */
-  void AddToManifest(std::string const& f);
+  void AddToManifest(const std::string& config, std::string const& f);
 
   void EnableInstallTarget();
 
@@ -265,6 +264,11 @@ public:
                                         const std::string& suffix,
                                         std::string& dir);
 
+  /** Get the manifest of all targets that will be built for each
+      configuration.  This is valid during generation only.  */
+  cmTargetManifest const& GetTargetManifest() const
+    { return this->TargetManifest; }
+
   /** Get the content of a directory.  Directory listings are cached
       and re-loaded from disk only when modified.  During the generation
       step the content will include the target files to be built even if
@@ -369,6 +373,8 @@ public:
 
   std::string MakeSilentFlag;
 protected:
+  virtual void Generate();
+
   typedef std::vector<cmLocalGenerator*> GeneratorVector;
   // for a project collect all its targets by following depend
   // information, and also collect all the targets
@@ -423,6 +429,10 @@ protected:
   std::map<std::string, cmExportBuildFileGenerator*> BuildExportSets;
   std::map<std::string, cmExportBuildFileGenerator*> BuildExportExportSets;
 
+  // Manifest of all targets that will be built for each configuration.
+  // This is computed just before local generators generate.
+  cmTargetManifest TargetManifest;
+
   // All targets in the entire project.
 #if defined(CMAKE_BUILD_WITH_CMAKE)
 #ifdef CMake_HAVE_CXX11_UNORDERED_MAP
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx 
b/Source/cmGlobalVisualStudio10Generator.cxx
index 8ec4fd9..4e8ada4 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -314,18 +314,9 @@ 
cmGlobalVisualStudio10Generator::CreateLocalGenerator(cmLocalGenerator* parent,
 }
 
 //----------------------------------------------------------------------------
-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 06c598f..74d5022 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 void Compute();
-
   ///! create the correct local generator
   virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
                                                  cmState::Snapshot snapshot);
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx 
b/Source/cmGlobalVisualStudio8Generator.cxx
index a46521f..f3cf36e 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -254,8 +254,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
     mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false,
                           no_working_directory, no_depends,
                           noCommandLines);
-  cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, root);
-  mf->AddGeneratorTarget(tgt, gt);
 
   // Organize in the "predefined targets" folder:
   //
@@ -347,13 +345,8 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
 }
 
 //----------------------------------------------------------------------------
-bool cmGlobalVisualStudio8Generator::Compute()
+void cmGlobalVisualStudio8Generator::Generate()
 {
-  if (!cmGlobalVisualStudio7Generator::Compute())
-    {
-    return false;
-    }
-
   if(this->AddCheckTarget())
     {
     // All targets depend on the build-system check target.
@@ -367,7 +360,9 @@ bool cmGlobalVisualStudio8Generator::Compute()
         }
       }
     }
-  return true;
+
+  // Now perform the main generation.
+  this->cmGlobalVisualStudio7Generator::Generate();
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudio8Generator.h 
b/Source/cmGlobalVisualStudio8Generator.h
index 1c61103..cc02b78 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -67,7 +67,7 @@ public:
     return !this->WindowsCEVersion.empty(); }
 
 protected:
-  virtual bool Compute();
+  virtual void Generate();
   virtual const char* GetIDEVersion() { return "8.0"; }
 
   virtual std::string FindDevEnvCommand();
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx 
b/Source/cmGlobalVisualStudioGenerator.cxx
index aec80fd..1d583eb 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -64,13 +64,8 @@ std::string cmGlobalVisualStudioGenerator::GetRegistryBase(
 }
 
 //----------------------------------------------------------------------------
-bool cmGlobalVisualStudioGenerator::Compute()
+void cmGlobalVisualStudioGenerator::Generate()
 {
-  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;
@@ -90,8 +85,6 @@ bool cmGlobalVisualStudioGenerator::Compute()
         AddUtilityCommand("ALL_BUILD", true, no_working_dir,
                           no_depends, no_commands, false,
                           "Build all projects");
-      cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, root);
-      allBuild->GetMakefile()->AddGeneratorTarget(allBuild, gt);
 
 #if 0
       // Can't activate this code because we want ALL_BUILD
@@ -115,10 +108,6 @@ bool cmGlobalVisualStudioGenerator::Compute()
         for(cmTargets::iterator t = targets.begin();
             t != targets.end(); ++t)
           {
-          if (t->second.GetType() == cmTarget::GLOBAL_TARGET)
-            {
-            continue;
-            }
           if(!this->IsExcluded(gen[0], t->second))
             {
             allBuild->AddUtility(t->second.GetName());
@@ -141,7 +130,9 @@ bool cmGlobalVisualStudioGenerator::Compute()
       static_cast<cmLocalVisualStudioGenerator*>(*lgi);
     lg->AddCMakeListsRules();
     }
-  return true;
+
+  // Run all the local generators.
+  this->cmGlobalGenerator::Generate();
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudioGenerator.h 
b/Source/cmGlobalVisualStudioGenerator.h
index 64440ad..8e2d6a4 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -108,7 +108,7 @@ public:
     cmGeneratorTarget*, std::vector<cmCustomCommand>& commands,
     std::string const& configName);
 protected:
-  virtual bool Compute();
+  virtual void Generate();
 
   // Does this VS version link targets to each other if there are
   // dependencies in the SLN file?  This was done for VS versions
diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index e5443e0..ba5ff30 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -378,13 +378,8 @@ 
cmGlobalXCodeGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
 }
 
 //----------------------------------------------------------------------------
-bool cmGlobalXCodeGenerator::Compute()
+void cmGlobalXCodeGenerator::Generate()
 {
-  if (!cmGlobalGenerator::Compute())
-    {
-      return false;
-    }
-
   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
@@ -395,11 +390,6 @@ bool cmGlobalXCodeGenerator::Compute()
     // add ALL_BUILD, INSTALL, etc
     this->AddExtraTargets(root, it->second);
     }
-  return true;
-}
-
-void cmGlobalXCodeGenerator::Generate()
-{
   this->cmGlobalGenerator::Generate();
   if(cmSystemTools::GetErrorOccuredFlag())
     {
@@ -459,11 +449,10 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* 
root,
   // Add ALL_BUILD
   const char* no_working_directory = 0;
   std::vector<std::string> no_depends;
-  cmTarget* allbuild = mf->AddUtilityCommand("ALL_BUILD", true, no_depends,
+  mf->AddUtilityCommand("ALL_BUILD", true, no_depends,
                         no_working_directory,
                         "echo", "Build all projects");
-  cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, root);
-  mf->AddGeneratorTarget(allBuild, gt);
+  cmTarget* allbuild = mf->FindTarget("ALL_BUILD");
 
   // Refer to the main build configuration file for easy editing.
   std::string listfile = mf->GetCurrentSourceDirectory();
@@ -492,12 +481,9 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* 
root,
     std::string file = this->ConvertToRelativeForMake(
       this->CurrentReRunCMakeMakefile.c_str());
     cmSystemTools::ReplaceString(file, "\\ ", " ");
-    cmTarget* check = mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET,
-                          true, no_depends,
+    mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, true, no_depends,
                           no_working_directory,
                           "make", "-f", file.c_str());
-    cmGeneratorTarget* gt = new cmGeneratorTarget(check, root);
-    mf->AddGeneratorTarget(check, gt);
     }
 
   // now make the allbuild depend on all the non-utility targets
@@ -516,11 +502,6 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* 
root,
       {
       cmTarget& target = l->second;
 
-      if (target.GetType() == cmTarget::GLOBAL_TARGET)
-        {
-        continue;
-        }
-
       if (regenerate && (l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET))
         {
         target.AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ee8bf2c..c36e4af 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -88,7 +88,6 @@ public:
   virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf);
   void AppendFlag(std::string& flags, std::string const& flag);
 protected:
-  virtual bool Compute();
   virtual void Generate();
 private:
   cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget,
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index f548f5d..899b088 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -27,8 +27,7 @@ static cmInstallTargetGenerator* 
CreateInstallTargetGenerator(cmTarget& target,
 {
   cmInstallGenerator::MessageLevel message =
     cmInstallGenerator::SelectMessageLevel(target.GetMakefile());
-  return new cmInstallTargetGenerator(target.GetName(),
-                        args.GetDestination().c_str(),
+  return new cmInstallTargetGenerator(target, args.GetDestination().c_str(),
                         impLib, args.GetPermissions().c_str(),
                         args.GetConfigurations(), args.GetComponent().c_str(),
                         message,
@@ -753,12 +752,6 @@ bool 
cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
     installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
     installsResource = installsResource || resourceGenerator;
 
-    if (installsArchive || installsRuntime || installsFramework
-        || installsLibrary || installsBundle)
-      {
-      target.SetHaveInstallRule(true);
-      }
-
     this->Makefile->AddInstallGenerator(archiveGenerator);
     this->Makefile->AddInstallGenerator(libraryGenerator);
     this->Makefile->AddInstallGenerator(runtimeGenerator);
diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h
index b8e5b53..c4191e4 100644
--- a/Source/cmInstallGenerator.h
+++ b/Source/cmInstallGenerator.h
@@ -62,8 +62,6 @@ public:
   /** Select message level from CMAKE_INSTALL_MESSAGE or 'never'.  */
   static MessageLevel SelectMessageLevel(cmMakefile* mf, bool never = false);
 
-  virtual void Compute(cmLocalGenerator*) {}
-
 protected:
   virtual void GenerateScript(std::ostream& os);
 
diff --git a/Source/cmInstallTargetGenerator.cxx 
b/Source/cmInstallTargetGenerator.cxx
index 01d4b77..5115788 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -16,29 +16,26 @@
 #include "cmGlobalGenerator.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
-#include "cmGeneratorTarget.h"
 #include "cmake.h"
 
 #include <assert.h>
 
 //----------------------------------------------------------------------------
 cmInstallTargetGenerator
-::cmInstallTargetGenerator(const std::string& targetName,
-                           const char* dest, bool implib,
+::cmInstallTargetGenerator(cmTarget& t, const char* dest, bool implib,
                            const char* file_permissions,
                            std::vector<std::string> const& configurations,
                            const char* component,
                            MessageLevel message,
                            bool optional):
-  cmInstallGenerator(dest, configurations, component, message),
-  TargetName(targetName),
-  Target(0),
+  cmInstallGenerator(dest, configurations, component, message), Target(&t),
   FilePermissions(file_permissions),
   ImportLibrary(implib),
   Optional(optional)
 {
   this->ActionsPerConfig = true;
   this->NamelinkMode = NamelinkModeNone;
+  this->Target->SetHaveInstallRule(true);
 }
 
 //----------------------------------------------------------------------------
@@ -72,17 +69,15 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
 {
   // Compute the build tree directory from which to copy the target.
   std::string fromDirConfig;
-  if(this->Target->Target->NeedRelinkBeforeInstall(config))
+  if(this->Target->NeedRelinkBeforeInstall(config))
     {
-    fromDirConfig =
-        this->Target->Target->GetMakefile()->GetCurrentBinaryDirectory();
+    fromDirConfig = this->Target->GetMakefile()->GetCurrentBinaryDirectory();
     fromDirConfig += cmake::GetCMakeFilesDirectory();
     fromDirConfig += "/CMakeRelink.dir/";
     }
   else
     {
-    fromDirConfig =
-        this->Target->Target->GetDirectory(config, this->ImportLibrary);
+    fromDirConfig = this->Target->GetDirectory(config, this->ImportLibrary);
     fromDirConfig += "/";
     }
   std::string toDir =
@@ -93,8 +88,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
   std::vector<std::string> filesFrom;
   std::vector<std::string> filesTo;
   std::string literal_args;
-  cmTarget::TargetType targetType =
-      static_cast<cmTarget::TargetType>(this->Target->GetType());
+  cmTarget::TargetType targetType = this->Target->GetType();
   cmInstallType type = cmInstallType();
   switch(targetType)
     {
@@ -111,7 +105,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
     case cmTarget::UTILITY:
     case cmTarget::GLOBAL_TARGET:
     case cmTarget::UNKNOWN_LIBRARY:
-      this->Target->Target->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR,
+      this->Target->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR,
         "cmInstallTargetGenerator created with non-installable target.");
       return;
     }
@@ -124,7 +118,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
     std::string targetNameReal;
     std::string targetNameImport;
     std::string targetNamePDB;
-    this->Target->Target->GetExecutableNames(targetName, targetNameReal,
+    this->Target->GetExecutableNames(targetName, targetNameReal,
                                      targetNameImport, targetNamePDB,
                                      config);
     if(this->ImportLibrary)
@@ -134,7 +128,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
       filesFrom.push_back(from1);
       filesTo.push_back(to1);
       std::string targetNameImportLib;
-      if(this->Target->Target->GetImplibGNUtoMS(targetNameImport,
+      if(this->Target->GetImplibGNUtoMS(targetNameImport,
                                         targetNameImportLib))
         {
         filesFrom.push_back(fromDirConfig + targetNameImportLib);
@@ -150,7 +144,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
       std::string to1 = toDir + targetName;
 
       // Handle OSX Bundles.
-      if(this->Target->Target->IsAppBundleOnApple())
+      if(this->Target->IsAppBundleOnApple())
         {
         // Install the whole app bundle directory.
         type = cmInstallType_DIRECTORY;
@@ -184,8 +178,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
     std::string targetNameReal;
     std::string targetNameImport;
     std::string targetNamePDB;
-    this->Target->Target->GetLibraryNames(targetName, targetNameSO,
-                                          targetNameReal,
+    this->Target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
                                   targetNameImport, targetNamePDB,
                                   config);
     if(this->ImportLibrary)
@@ -198,7 +191,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
       filesFrom.push_back(from1);
       filesTo.push_back(to1);
       std::string targetNameImportLib;
-      if(this->Target->Target->GetImplibGNUtoMS(targetNameImport,
+      if(this->Target->GetImplibGNUtoMS(targetNameImport,
                                         targetNameImportLib))
         {
         filesFrom.push_back(fromDirConfig + targetNameImportLib);
@@ -208,7 +201,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
       // An import library looks like a static library.
       type = cmInstallType_STATIC_LIBRARY;
       }
-    else if(this->Target->Target->IsFrameworkOnApple())
+    else if(this->Target->IsFrameworkOnApple())
       {
       // There is a bug in cmInstallCommand if this fails.
       assert(this->NamelinkMode == NamelinkModeNone);
@@ -226,7 +219,7 @@ void 
cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
       filesFrom.push_back(from1);
       filesTo.push_back(to1);
       }
-    else if(this->Target->Target->IsCFBundleOnApple())
+    else if(this->Target->IsCFBundleOnApple())
       {
       // Install the whole app bundle directory.
       type = cmInstallType_DIRECTORY;
@@ -350,7 +343,7 @@ cmInstallTargetGenerator::GetDestination(std::string const& 
config) const
 {
   cmGeneratorExpression ge;
   return ge.Parse(this->Destination)
-    ->Evaluate(this->Target->Target->GetMakefile(), config);
+    ->Evaluate(this->Target->GetMakefile(), config);
 }
 
 //----------------------------------------------------------------------------
@@ -359,7 +352,7 @@ cmInstallTargetGenerator::GetInstallFilename(const 
std::string& config) const
 {
   NameType nameType = this->ImportLibrary? NameImplib : NameNormal;
   return
-    cmInstallTargetGenerator::GetInstallFilename(this->Target->Target, config,
+    cmInstallTargetGenerator::GetInstallFilename(this->Target, config,
                                                  nameType);
 }
 
@@ -438,12 +431,6 @@ cmInstallTargetGenerator::GetInstallFilename(cmTarget 
const* target,
   return fname;
 }
 
-void cmInstallTargetGenerator::Compute(cmLocalGenerator* lg)
-{
-  this->Target = lg->GetGlobalGenerator()->GetGeneratorTarget(
-        lg->GetMakefile()->FindTarget(this->TargetName));
-}
-
 //----------------------------------------------------------------------------
 void
 cmInstallTargetGenerator
@@ -546,8 +533,8 @@ cmInstallTargetGenerator
     }
 
   // Fix the install_name settings in installed binaries.
-  std::string installNameTool = this->Target->Target->GetMakefile()
-      ->GetSafeDefinition("CMAKE_INSTALL_NAME_TOOL");
+  std::string installNameTool =
+    this->Target->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_NAME_TOOL");
 
   if(installNameTool.empty())
     {
@@ -557,8 +544,7 @@ cmInstallTargetGenerator
   // Build a map of build-tree install_name to install-tree install_name for
   // shared libraries linked to this target.
   std::map<std::string, std::string> install_name_remap;
-  if(cmComputeLinkInformation* cli =
-     this->Target->Target->GetLinkInformation(config))
+  if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config))
     {
     std::set<cmTarget const*> const& sharedLibs
                                             = cli->GetSharedLibrariesLinked();
@@ -602,11 +588,11 @@ cmInstallTargetGenerator
   if(this->Target->GetType() == cmTarget::SHARED_LIBRARY)
     {
     std::string for_build =
-      this->Target->Target->GetInstallNameDirForBuildTree(config);
+      this->Target->GetInstallNameDirForBuildTree(config);
     std::string for_install =
-      this->Target->Target->GetInstallNameDirForInstallTree();
+      this->Target->GetInstallNameDirForInstallTree();
 
-    if(this->Target->Target->IsFrameworkOnApple() && for_install.empty())
+    if(this->Target->IsFrameworkOnApple() && for_install.empty())
       {
       // Frameworks seem to have an id corresponding to their own full
       // path.
@@ -620,7 +606,7 @@ cmInstallTargetGenerator
       {
       // Prepare to refer to the install-tree install_name.
       new_id = for_install;
-      new_id += this->GetInstallFilename(this->Target->Target, config, NameSO);
+      new_id += this->GetInstallFilename(this->Target, config, NameSO);
       }
     }
 
@@ -653,22 +639,20 @@ cmInstallTargetGenerator
                     std::string const& toDestDirPath)
 {
   // Skip the chrpath if the target does not need it.
-  if(this->ImportLibrary || !this->Target->Target->IsChrpathUsed(config))
+  if(this->ImportLibrary || !this->Target->IsChrpathUsed(config))
     {
     return;
     }
 
   // Skip if on Apple
-  if(this->Target->Target->GetMakefile()
-     ->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
+  if(this->Target->GetMakefile()->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
     {
     return;
     }
 
   // Get the link information for this target.
   // It can provide the RPATH.
-  cmComputeLinkInformation* cli =
-      this->Target->Target->GetLinkInformation(config);
+  cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config);
   if(!cli)
     {
     return;
@@ -693,21 +677,20 @@ cmInstallTargetGenerator
                       std::string const& toDestDirPath)
 {
   // Skip the chrpath if the target does not need it.
-  if(this->ImportLibrary || !this->Target->Target->IsChrpathUsed(config))
+  if(this->ImportLibrary || !this->Target->IsChrpathUsed(config))
     {
     return;
     }
 
   // Get the link information for this target.
   // It can provide the RPATH.
-  cmComputeLinkInformation* cli =
-      this->Target->Target->GetLinkInformation(config);
+  cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config);
   if(!cli)
     {
     return;
     }
 
-  cmMakefile* mf = this->Target->Target->GetMakefile();
+  cmMakefile* mf = this->Target->GetMakefile();
 
   if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
     {
@@ -819,20 +802,20 @@ cmInstallTargetGenerator::AddStripRule(std::ostream& os,
     }
 
   // Don't handle OSX Bundles.
-  if(this->Target->Target->GetMakefile()->IsOn("APPLE") &&
-     this->Target->Target->GetPropertyAsBool("MACOSX_BUNDLE"))
+  if(this->Target->GetMakefile()->IsOn("APPLE") &&
+     this->Target->GetPropertyAsBool("MACOSX_BUNDLE"))
     {
     return;
     }
 
-  if(! this->Target->Target->GetMakefile()->IsSet("CMAKE_STRIP"))
+  if(! this->Target->GetMakefile()->IsSet("CMAKE_STRIP"))
     {
     return;
     }
 
   os << indent << "if(CMAKE_INSTALL_DO_STRIP)\n";
   os << indent << "  execute_process(COMMAND \""
-     << this->Target->Target->GetMakefile()->GetDefinition("CMAKE_STRIP")
+     << this->Target->GetMakefile()->GetDefinition("CMAKE_STRIP")
      << "\" \"" << toDestDirPath << "\")\n";
   os << indent << "endif()\n";
 }
@@ -851,13 +834,13 @@ cmInstallTargetGenerator::AddRanlibRule(std::ostream& os,
 
   // Perform post-installation processing on the file depending
   // on its type.
-  if(!this->Target->Target->GetMakefile()->IsOn("APPLE"))
+  if(!this->Target->GetMakefile()->IsOn("APPLE"))
     {
     return;
     }
 
   std::string ranlib =
-    this->Target->Target->GetMakefile()->GetRequiredDefinition("CMAKE_RANLIB");
+    this->Target->GetMakefile()->GetRequiredDefinition("CMAKE_RANLIB");
   if(ranlib.empty())
     {
     return;
diff --git a/Source/cmInstallTargetGenerator.h 
b/Source/cmInstallTargetGenerator.h
index a8f4a75..db69220 100644
--- a/Source/cmInstallTargetGenerator.h
+++ b/Source/cmInstallTargetGenerator.h
@@ -13,9 +13,7 @@
 #define cmInstallTargetGenerator_h
 
 #include "cmInstallGenerator.h"
-
-class cmTarget;
-class cmGeneratorTarget;
+#include "cmTarget.h"
 
 /** \class cmInstallTargetGenerator
  * \brief Generate target installation rules.
@@ -24,7 +22,7 @@ class cmInstallTargetGenerator: public cmInstallGenerator
 {
 public:
   cmInstallTargetGenerator(
-    std::string const& targetName, const char* dest, bool implib,
+    cmTarget& t, const char* dest, bool implib,
     const char* file_permissions,
     std::vector<std::string> const& configurations,
     const char* component,
@@ -58,10 +56,7 @@ public:
                                         const std::string& config,
                                         NameType nameType = NameNormal);
 
-  void Compute(cmLocalGenerator* lg);
-
-  cmGeneratorTarget* GetTarget() const { return this->Target; }
-
+  cmTarget* GetTarget() const { return this->Target; }
   bool IsImportLibrary() const { return this->ImportLibrary; }
 
   std::string GetDestination(std::string const& config) const;
@@ -103,8 +98,7 @@ protected:
   void AddRanlibRule(std::ostream& os, Indent const& indent,
                      const std::string& toDestDirPath);
 
-  std::string TargetName;
-  cmGeneratorTarget* Target;
+  cmTarget* Target;
   std::string FilePermissions;
   NamelinkModeType NamelinkMode;
   bool ImportLibrary;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 6b48a44..2e20ee2 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2375,15 +2375,11 @@ 
cmLocalGenerator::ConstructComment(cmCustomCommandGenerator const& ccg,
 class cmInstallTargetGeneratorLocal: public cmInstallTargetGenerator
 {
 public:
-  cmInstallTargetGeneratorLocal(cmLocalGenerator* lg, std::string const& t,
-                                const char* dest, bool implib):
+  cmInstallTargetGeneratorLocal(cmTarget& t, const char* dest, bool implib):
     cmInstallTargetGenerator(
       t, dest, implib, "", std::vector<std::string>(), "Unspecified",
-      cmInstallGenerator::SelectMessageLevel(lg->GetMakefile()),
-      false)
-  {
-    this->Compute(lg);
-  }
+      cmInstallGenerator::SelectMessageLevel(t.GetMakefile()),
+      false) {}
 };
 
 //----------------------------------------------------------------------------
@@ -2432,7 +2428,7 @@ cmLocalGenerator
           {
           // Use a target install generator.
           cmInstallTargetGeneratorLocal
-            g(this, l->first, destination.c_str(), false);
+            g(l->second, destination.c_str(), false);
           g.Generate(os, config, configurationTypes);
           }
           break;
@@ -2443,18 +2439,18 @@ cmLocalGenerator
           // to the normal destination and the DLL to the runtime
           // destination.
           cmInstallTargetGeneratorLocal
-            g1(this, l->first, destination.c_str(), true);
+            g1(l->second, destination.c_str(), true);
           g1.Generate(os, config, configurationTypes);
           // We also skip over the leading slash given by the user.
           destination = l->second.GetRuntimeInstallPath().substr(1);
           cmSystemTools::ConvertToUnixSlashes(destination);
           cmInstallTargetGeneratorLocal
-            g2(this, l->first, destination.c_str(), false);
+            g2(l->second, destination.c_str(), false);
           g2.Generate(os, config, configurationTypes);
 #else
           // Use a target install generator.
           cmInstallTargetGeneratorLocal
-            g(this, l->first, destination.c_str(), false);
+            g(l->second, destination.c_str(), false);
           g.Generate(os, config, configurationTypes);
 #endif
           }
diff --git a/Source/cmLocalVisualStudio6Generator.cxx 
b/Source/cmLocalVisualStudio6Generator.cxx
index cab5a47..f1c8def 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -88,8 +88,7 @@ void cmLocalVisualStudio6Generator::AddCMakeListsRules()
   for(cmTargets::iterator l = tgts.begin();
       l != tgts.end(); l++)
     {
-    if (l->second.GetType() == cmTarget::INTERFACE_LIBRARY
-        || l->second.GetType() == cmTarget::GLOBAL_TARGET)
+    if (l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
       {
       continue;
       }
diff --git a/Source/cmLocalVisualStudio7Generator.cxx 
b/Source/cmLocalVisualStudio7Generator.cxx
index 572dbde..f199a41 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -108,10 +108,6 @@ void cmLocalVisualStudio7Generator::AddCMakeListsRules()
       // Add the rule to targets that need it.
       for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
         {
-        if (l->second.GetType() == cmTarget::GLOBAL_TARGET)
-          {
-          continue;
-          }
         if(l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET)
           {
           l->second.AddSource(sf->GetFullPath());
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a9ba62b..57e33df 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1905,12 +1905,6 @@ const char* cmMakefile::GetCurrentBinaryDirectory() const
   return this->StateSnapshot.GetDirectory().GetCurrentBinary();
 }
 
-void cmMakefile::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
-{
-  this->GeneratorTargets[t] = gt;
-  this->GetGlobalGenerator()->AddGeneratorTarget(t, gt);
-}
-
 //----------------------------------------------------------------------------
 void cmMakefile::AddIncludeDirectories(const std::vector<std::string> &incs,
                                        bool before)
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 4d3424d..7938fcc 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -416,7 +416,10 @@ public:
     {
       this->GeneratorTargets = targets;
     }
-  void AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt);
+  void AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
+  {
+    this->GeneratorTargets[t] = gt;
+  }
 
   cmTarget* FindTarget(const std::string& name,
                        bool excludeAliases = false) const;
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 1322dea..979db91 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -476,6 +476,7 @@ bool 
cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg,
                                 commandLines, false, autogenComment.c_str());
 
     cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
+    lg->GetGlobalGenerator()->AddGeneratorTarget(autogenTarget, gt);
     makefile->AddGeneratorTarget(autogenTarget, gt);
 
     // Set target folder
diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h
index bc9372f..9ab04f1 100644
--- a/Source/cmScriptGenerator.h
+++ b/Source/cmScriptGenerator.h
@@ -54,6 +54,9 @@ public:
   void Generate(std::ostream& os, const std::string& config,
                 std::vector<std::string> const& configurationTypes);
 
+  const std::vector<std::string>& GetConfigurations() const
+    { return this->Configurations; }
+
 protected:
   typedef cmScriptGeneratorIndent Indent;
   virtual void GenerateScript(std::ostream& os);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ec8276e..9d2c19e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1607,11 +1607,7 @@ int cmake::Generate()
     {
     return -1;
     }
-  if (!this->GlobalGenerator->Compute())
-    {
-    return -1;
-    }
-  this->GlobalGenerator->Generate();
+  this->GlobalGenerator->DoGenerate();
   if ( !this->GraphVizFile.empty() )
     {
     std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;

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

Summary of changes:
 Source/cmExportInstallFileGenerator.cxx    |    2 +-
 Source/cmGeneratorTarget.cxx               |   10 ++--
 Source/cmGlobalGenerator.cxx               |   35 ++++-------
 Source/cmGlobalGenerator.h                 |   16 ++++-
 Source/cmGlobalVisualStudio10Generator.cxx |   11 +---
 Source/cmGlobalVisualStudio10Generator.h   |    2 -
 Source/cmGlobalVisualStudio8Generator.cxx  |   13 ++--
 Source/cmGlobalVisualStudio8Generator.h    |    2 +-
 Source/cmGlobalVisualStudioGenerator.cxx   |   17 ++----
 Source/cmGlobalVisualStudioGenerator.h     |    2 +-
 Source/cmGlobalXCodeGenerator.cxx          |   27 ++-------
 Source/cmGlobalXCodeGenerator.h            |    1 -
 Source/cmInstallCommand.cxx                |    9 +--
 Source/cmInstallGenerator.h                |    2 -
 Source/cmInstallTargetGenerator.cxx        |   89 +++++++++++-----------------
 Source/cmInstallTargetGenerator.h          |   14 ++---
 Source/cmLocalGenerator.cxx                |   18 +++---
 Source/cmLocalVisualStudio6Generator.cxx   |    3 +-
 Source/cmLocalVisualStudio7Generator.cxx   |    4 --
 Source/cmMakefile.cxx                      |    6 --
 Source/cmMakefile.h                        |    5 +-
 Source/cmQtAutoGenerators.cxx              |    1 +
 Source/cmScriptGenerator.h                 |    3 +
 Source/cmake.cxx                           |    6 +-
 24 files changed, 105 insertions(+), 193 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to