[Cmake-commits] CMake branch, next, updated. v3.3.0-rc1-289-gc057802

Stephen Kelly steveire at gmail.com
Mon Jun 8 16:55:47 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  c057802e482031a7a05e86e8fc0931c1ebd76ddb (commit)
       via  2cb5708a212e532963d70795d234db593ca5a892 (commit)
       via  aa8cd1ededcf9770759f7d9b5cae7f2c58cd3908 (commit)
       via  0402b578f22fc6a8c982e2b0824dae25c3d9bc3b (commit)
       via  b5a805f2f36aaeb183ec7a2e9f7b7736381a06ff (commit)
       via  010092def04d5cf9cb37d47a4b1d0e5901a23c7f (commit)
       via  74ed9a8c5943e043ec3b24d9f55d900b26b61205 (commit)
       via  812496a6a94eb46290b63a69a831658165893a06 (commit)
       via  6abd2a91bd952aab90b8954d44284ee670916afc (commit)
       via  e06e2c16a14b2095fb3f4aed5cacfbe12bad1657 (commit)
       via  0f7740f1342241af4a82b67379b12c2e88fe97f7 (commit)
       via  2045137c5a2c98fe92bd8f67c50c55397c176854 (commit)
       via  32857d96bf17ba9943c26b3ae42eb744f01efa4b (commit)
       via  f5ef691b27eff45bd77b5f09e86a0bc9f69a1b4a (commit)
       via  eaeccc5fc9bea3227c3bf1d6a4da915fd1eea627 (commit)
       via  6e8c521268f4aa496e9aec9130a1f4d9a4654ec4 (commit)
       via  dbe3fc87bd9389ea028b9f024f5d5d15ed81de57 (commit)
       via  84c26be931f7d24d51c478e52753c3c2204f7389 (commit)
      from  484c49d69550d895ac90570f594bab6ad611050d (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=c057802e482031a7a05e86e8fc0931c1ebd76ddb
commit c057802e482031a7a05e86e8fc0931c1ebd76ddb
Merge: 484c49d 2cb5708
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jun 8 16:55:45 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 8 16:55:45 2015 -0400

    Merge topic 'use-generator-target' into next
    
    2cb5708a cmGlobalGenerator: Map local generators to generator targets.
    aa8cd1ed cmMakefile: Remove unused method.
    0402b578 cmComputeTargetDepends: Change API to use cmGeneratorTarget.
    b5a805f2 Get the local generator from the GeneratorTarget.
    010092de cmMakefileTargetGenerator: Require cmGeneratorTarget.
    74ed9a8c cmNinjaGenerator: Require cmGeneratorTarget.
    812496a6 cmGeneratorTarget: Require a cmLocalGenerator to construct.
    6abd2a91 cmGlobalGenerator: Base exclusion computation on cmGeneratorTarget.
    e06e2c16 cmGlobalGenerator: Create GeneratorTargets with a local generator.
    0f7740f1 GHS: Use a cmGeneratorTarget in generator API.
    2045137c cmGeneratorTarget: Add accessor for cmLocalGenerator.
    32857d96 C::B: Get the Makefile from the LocalGenerator, not vice-versa.
    f5ef691b cmLocalGenerator: Constify GetIncludeDirectories method.
    eaeccc5f QtAutogen: Get the global generator from the Makefile.
    6e8c5212 cmMakefile: Move IsRoot API from cmLocalGenerator.
    dbe3fc87 cmMakefile: Use member directly instead of through method.
    ...


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cb5708a212e532963d70795d234db593ca5a892
commit 2cb5708a212e532963d70795d234db593ca5a892
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 15:24:24 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:32:34 2015 +0200

    cmGlobalGenerator: Map local generators to generator targets.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 23f676a..83cf810 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2036,9 +2036,9 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
           clg = clg->GetParent())
         {
         // This local generator includes the target.
-        std::set<cmTarget const*>& targetSet =
+        std::set<cmGeneratorTarget const*>& targetSet =
           this->LocalGeneratorToTargetMap[clg];
-        targetSet.insert(&target);
+        targetSet.insert(gt);
 
         // Add dependencies of the included target.  An excluded
         // target may still be included if it is a dependency of a
@@ -2047,8 +2047,7 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
         for(TargetDependSet::const_iterator ti = tgtdeps.begin();
             ti != tgtdeps.end(); ++ti)
           {
-          cmGeneratorTarget const* ttt = *ti;
-          targetSet.insert(ttt->Target);
+          targetSet.insert(*ti);
           }
         }
       }
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index bb5af5d..3d5c8aa 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -406,7 +406,7 @@ protected:
   cmMakefile* CurrentMakefile;
   // map from project name to vector of local generators in that project
   std::map<std::string, std::vector<cmLocalGenerator*> > ProjectMap;
-  std::map<cmLocalGenerator*, std::set<cmTarget const*> >
+  std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
                                                     LocalGeneratorToTargetMap;
 
   // Set of named installation components requested by the project.
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index acc72af..980b6cd 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -830,7 +830,7 @@ cmGlobalUnixMakefileGenerator3
                               cmLocalGenerator::FULL,
                               cmLocalGenerator::SHELL);
       //
-      std::set<cmTarget const*> emitted;
+      std::set<cmGeneratorTarget const*> emitted;
       progCmd << " "
               << this->CountProgressMarksInTarget(gtarget, emitted);
       commands.push_back(progCmd.str());
@@ -909,10 +909,10 @@ cmGlobalUnixMakefileGenerator3
 size_t
 cmGlobalUnixMakefileGenerator3
 ::CountProgressMarksInTarget(cmGeneratorTarget const* target,
-                             std::set<cmTarget const*>& emitted)
+                             std::set<cmGeneratorTarget const*>& emitted)
 {
   size_t count = 0;
-  if(emitted.insert(target->Target).second)
+  if(emitted.insert(target).second)
     {
     count = this->ProgressMap[target->Target].Marks.size();
     TargetDependSet const& depends = this->GetTargetDirectDepends(target);
@@ -935,14 +935,13 @@ cmGlobalUnixMakefileGenerator3
 ::CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg)
 {
   size_t count = 0;
-  std::set<cmTarget const*> emitted;
-  std::set<cmTarget const*> const& targets
+  std::set<cmGeneratorTarget const*> emitted;
+  std::set<cmGeneratorTarget const*> const& targets
                                         = this->LocalGeneratorToTargetMap[lg];
-  for(std::set<cmTarget const*>::const_iterator t = targets.begin();
+  for(std::set<cmGeneratorTarget const*>::const_iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    cmGeneratorTarget* gt = this->GetGeneratorTarget(*t);
-    count += this->CountProgressMarksInTarget(gt, emitted);
+    count += this->CountProgressMarksInTarget(*t, emitted);
     }
   return count;
 }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 8805011..14adf2e 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -199,7 +199,7 @@ protected:
   ProgressMapType ProgressMap;
 
   size_t CountProgressMarksInTarget(cmGeneratorTarget const* target,
-                                    std::set<cmTarget const*>& emitted);
+                                 std::set<cmGeneratorTarget const*>& emitted);
   size_t CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg);
 
   cmGeneratedFileStream *CommandDatabase;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa8cd1ededcf9770759f7d9b5cae7f2c58cd3908
commit aa8cd1ededcf9770759f7d9b5cae7f2c58cd3908
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:27:52 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:32:34 2015 +0200

    cmMakefile: Remove unused method.

diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index aef6c9e..c031ee8 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -134,10 +134,6 @@ public:
 
   bool GetIsSourceFileTryCompile() const;
 
-  ///! Get the current makefile generator.
-  cmLocalGenerator* GetLocalGenerator() const
-    { return this->LocalGenerator;}
-
   /**
    * Help enforce global target name uniqueness.
    */

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0402b578f22fc6a8c982e2b0824dae25c3d9bc3b
commit 0402b578f22fc6a8c982e2b0824dae25c3d9bc3b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:08:17 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:32:34 2015 +0200

    cmComputeTargetDepends: Change API to use cmGeneratorTarget.

diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 87b47b4..c4a03a0 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -147,12 +147,12 @@ bool cmComputeTargetDepends::Compute()
 
 //----------------------------------------------------------------------------
 void
-cmComputeTargetDepends::GetTargetDirectDepends(cmTarget const* t,
+cmComputeTargetDepends::GetTargetDirectDepends(cmGeneratorTarget const* t,
                                                cmTargetDependSet& deps)
 {
   // Lookup the index for this target.  All targets should be known by
   // this point.
-  std::map<cmTarget const*, int>::const_iterator tii
+  std::map<cmGeneratorTarget const*, int>::const_iterator tii
                                                   = this->TargetIndex.find(t);
   assert(tii != this->TargetIndex.end());
   int i = tii->second;
@@ -161,7 +161,7 @@ cmComputeTargetDepends::GetTargetDirectDepends(cmTarget const* t,
   EdgeList const& nl = this->FinalGraph[i];
   for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
     {
-    cmTarget const* dep = this->Targets[*ni];
+    cmGeneratorTarget const* dep = this->Targets[*ni];
     cmTargetDependSet::iterator di = deps.insert(dep).first;
     di->SetType(ni->IsStrong());
     }
@@ -180,9 +180,11 @@ void cmComputeTargetDepends::CollectTargets()
         ti != targets.end(); ++ti)
       {
       cmTarget const* target = &ti->second;
+      cmGeneratorTarget* gt =
+          this->GlobalGenerator->GetGeneratorTarget(target);
       int index = static_cast<int>(this->Targets.size());
-      this->TargetIndex[target] = index;
-      this->Targets.push_back(target);
+      this->TargetIndex[gt] = index;
+      this->Targets.push_back(gt);
       }
     }
 }
@@ -204,7 +206,7 @@ void cmComputeTargetDepends::CollectDepends()
 void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
 {
   // Get the depender.
-  cmTarget const* depender = this->Targets[depender_index];
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
   if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
     {
     return;
@@ -216,10 +218,9 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
   // deal with config-specific dependencies.
   {
   std::set<std::string> emitted;
-  cmGeneratorTarget* gt = this->GlobalGenerator->GetGeneratorTarget(depender);
 
   std::vector<std::string> configs;
-  depender->GetMakefile()->GetConfigurations(configs);
+  depender->Makefile->GetConfigurations(configs);
   if (configs.empty())
     {
     configs.push_back("");
@@ -228,7 +229,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
     it != configs.end(); ++it)
     {
     std::vector<cmSourceFile const*> objectFiles;
-    gt->GetExternalObjects(objectFiles, *it);
+    depender->GetExternalObjects(objectFiles, *it);
     for(std::vector<cmSourceFile const*>::const_iterator
         oi = objectFiles.begin(); oi != objectFiles.end(); ++oi)
       {
@@ -244,15 +245,15 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
             ->IssueMessage(cmake::FATAL_ERROR,
                             "Only executables and non-OBJECT libraries may "
                             "reference target objects.",
-                            depender->GetBacktrace());
+                            depender->Target->GetBacktrace());
           return;
           }
-        const_cast<cmTarget*>(depender)->AddUtility(objLib);
+        const_cast<cmGeneratorTarget*>(depender)->Target->AddUtility(objLib);
         }
       }
 
     cmTarget::LinkImplementation const* impl =
-      depender->GetLinkImplementation(*it);
+      depender->Target->GetLinkImplementation(*it);
 
     // A target should not depend on itself.
     emitted.insert(depender->GetName());
@@ -272,7 +273,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
 
   // Loop over all utility dependencies.
   {
-  std::set<cmLinkItem> const& tutils = depender->GetUtilityItems();
+  std::set<cmLinkItem> const& tutils = depender->Target->GetUtilityItems();
   std::set<std::string> emitted;
   // A target should not depend on itself.
   emitted.insert(depender->GetName());
@@ -290,13 +291,14 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
 
 //----------------------------------------------------------------------------
 void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
-                                                 cmTarget const* dependee,
-                                                 const std::string& config,
-                                               std::set<std::string> &emitted)
+                                             const cmGeneratorTarget* dependee,
+                                             const std::string& config,
+                                             std::set<std::string> &emitted)
 {
-  cmTarget const* depender = this->Targets[depender_index];
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
   if(cmTarget::LinkInterface const* iface =
-                                dependee->GetLinkInterface(config, depender))
+                                dependee->Target->GetLinkInterface(config,
+                                                           depender->Target))
     {
     for(std::vector<cmLinkItem>::const_iterator
         lib = iface->Libraries.begin();
@@ -317,7 +319,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
                                              cmLinkItem const& dependee_name,
                                              std::set<std::string> &emitted)
 {
-  cmTarget const* depender = this->Targets[depender_index];
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
   cmTarget const* dependee = dependee_name.Target;
   // Skip targets that will not really be linked.  This is probably a
   // name conflict between an external library and an executable
@@ -331,16 +333,17 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
 
   if(dependee)
     {
-    this->AddInterfaceDepends(depender_index, dependee, "", emitted);
+    cmGeneratorTarget* gt =
+        this->GlobalGenerator->GetGeneratorTarget(dependee);
+    this->AddInterfaceDepends(depender_index, gt, "", emitted);
     std::vector<std::string> configs;
-    depender->GetMakefile()->GetConfigurations(configs);
+    depender->Makefile->GetConfigurations(configs);
     for (std::vector<std::string>::const_iterator it = configs.begin();
       it != configs.end(); ++it)
       {
       // A target should not depend on itself.
       emitted.insert(depender->GetName());
-      this->AddInterfaceDepends(depender_index, dependee,
-                                *it, emitted);
+      this->AddInterfaceDepends(depender_index, gt, *it, emitted);
       }
     }
 }
@@ -351,7 +354,7 @@ void cmComputeTargetDepends::AddTargetDepend(
   bool linking)
 {
   // Get the depender.
-  cmTarget const* depender = this->Targets[depender_index];
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
 
   // Check the target's makefile first.
   cmTarget const* dependee = dependee_name.Target;
@@ -362,7 +365,7 @@ void cmComputeTargetDepends::AddTargetDepend(
     cmake::MessageType messageType = cmake::AUTHOR_WARNING;
     bool issueMessage = false;
     std::ostringstream e;
-    switch(depender->GetPolicyStatusCMP0046())
+    switch(depender->Target->GetPolicyStatusCMP0046())
       {
       case cmPolicies::WARN:
         e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0046) << "\n";
@@ -383,7 +386,7 @@ void cmComputeTargetDepends::AddTargetDepend(
         << "\" of target \"" << depender->GetName() << "\" does not exist.";
 
       cmListFileBacktrace const* backtrace =
-        depender->GetUtilityBacktrace(dependee_name);
+        depender->Target->GetUtilityBacktrace(dependee_name);
       if(backtrace)
         {
         cm->IssueMessage(messageType, e.str(), *backtrace);
@@ -408,27 +411,31 @@ void cmComputeTargetDepends::AddTargetDepend(
 
   if(dependee)
     {
-    this->AddTargetDepend(depender_index, dependee, linking);
+    cmGeneratorTarget* gt =
+        this->GlobalGenerator->GetGeneratorTarget(dependee);
+    this->AddTargetDepend(depender_index, gt, linking);
     }
 }
 
 //----------------------------------------------------------------------------
 void cmComputeTargetDepends::AddTargetDepend(int depender_index,
-                                             cmTarget const* dependee,
+                                             const cmGeneratorTarget* dependee,
                                              bool linking)
 {
-  if(dependee->IsImported() ||
+  if(dependee->Target->IsImported() ||
      dependee->GetType() == cmTarget::INTERFACE_LIBRARY)
     {
     // Skip IMPORTED and INTERFACE targets but follow their utility
     // dependencies.
-    std::set<cmLinkItem> const& utils = dependee->GetUtilityItems();
+    std::set<cmLinkItem> const& utils = dependee->Target->GetUtilityItems();
     for(std::set<cmLinkItem>::const_iterator i = utils.begin();
         i != utils.end(); ++i)
       {
       if(cmTarget const* transitive_dependee = i->Target)
         {
-        this->AddTargetDepend(depender_index, transitive_dependee, false);
+        cmGeneratorTarget* gt =
+            this->GlobalGenerator->GetGeneratorTarget(transitive_dependee);
+        this->AddTargetDepend(depender_index, gt, false);
         }
       }
     }
@@ -436,7 +443,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
     {
     // Lookup the index for this target.  All targets should be known by
     // this point.
-    std::map<cmTarget const*, int>::const_iterator tii =
+    std::map<cmGeneratorTarget const*, int>::const_iterator tii =
       this->TargetIndex.find(dependee);
     assert(tii != this->TargetIndex.end());
     int dependee_index = tii->second;
@@ -457,13 +464,13 @@ cmComputeTargetDepends::DisplayGraph(Graph const& graph,
   for(int depender_index = 0; depender_index < n; ++depender_index)
     {
     EdgeList const& nl = graph[depender_index];
-    cmTarget const* depender = this->Targets[depender_index];
+    cmGeneratorTarget const* depender = this->Targets[depender_index];
     fprintf(stderr, "target %d is [%s]\n",
             depender_index, depender->GetName().c_str());
     for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
       {
       int dependee_index = *ni;
-      cmTarget const* dependee = this->Targets[dependee_index];
+      cmGeneratorTarget const* dependee = this->Targets[dependee_index];
       fprintf(stderr, "  depends on target %d [%s] (%s)\n", dependee_index,
               dependee->GetName().c_str(), ni->IsStrong()? "strong" : "weak");
       }
@@ -550,11 +557,11 @@ cmComputeTargetDepends
     {
     // Get the depender.
     int i = *ci;
-    cmTarget const* depender = this->Targets[i];
+    cmGeneratorTarget const* depender = this->Targets[i];
 
     // Describe the depender.
     e << "  \"" << depender->GetName() << "\" of type "
-      << cmTarget::GetTargetTypeName(depender->GetType()) << "\n";
+      << cmTarget::GetTargetTypeName(depender->Target->GetType()) << "\n";
 
     // List its dependencies that are inside the component.
     EdgeList const& nl = this->InitialGraph[i];
@@ -563,7 +570,7 @@ cmComputeTargetDepends
       int j = *ni;
       if(cmap[j] == c)
         {
-        cmTarget const* dependee = this->Targets[j];
+        cmGeneratorTarget const* dependee = this->Targets[j];
         e << "    depends on \"" << dependee->GetName() << "\""
           << " (" << (ni->IsStrong()? "strong" : "weak") << ")\n";
         }
diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h
index 902f342..6100d97 100644
--- a/Source/cmComputeTargetDepends.h
+++ b/Source/cmComputeTargetDepends.h
@@ -21,7 +21,7 @@
 class cmComputeComponentGraph;
 class cmGlobalGenerator;
 class cmLinkItem;
-class cmTarget;
+class cmGeneratorTarget;
 class cmTargetDependSet;
 
 /** \class cmComputeTargetDepends
@@ -39,9 +39,10 @@ public:
 
   bool Compute();
 
-  std::vector<cmTarget const*> const&
+  std::vector<cmGeneratorTarget const*> const&
   GetTargets() const { return this->Targets; }
-  void GetTargetDirectDepends(cmTarget const* t, cmTargetDependSet& deps);
+  void GetTargetDirectDepends(cmGeneratorTarget const* t,
+                              cmTargetDependSet& deps);
 private:
   void CollectTargets();
   void CollectDepends();
@@ -49,13 +50,14 @@ private:
   void AddTargetDepend(int depender_index,
                        cmLinkItem const& dependee_name,
                        bool linking);
-  void AddTargetDepend(int depender_index, cmTarget const* dependee,
+  void AddTargetDepend(int depender_index, cmGeneratorTarget const* dependee,
                        bool linking);
   bool ComputeFinalDepends(cmComputeComponentGraph const& ccg);
   void AddInterfaceDepends(int depender_index,
                            cmLinkItem const& dependee_name,
                            std::set<std::string> &emitted);
-  void AddInterfaceDepends(int depender_index, cmTarget const* dependee,
+  void AddInterfaceDepends(int depender_index,
+                           cmGeneratorTarget const* dependee,
                            const std::string& config,
                            std::set<std::string> &emitted);
   cmGlobalGenerator* GlobalGenerator;
@@ -63,8 +65,8 @@ private:
   bool NoCycles;
 
   // Collect all targets.
-  std::vector<cmTarget const*> Targets;
-  std::map<cmTarget const*, int> TargetIndex;
+  std::vector<cmGeneratorTarget const*> Targets;
+  std::map<cmGeneratorTarget const*, int> TargetIndex;
 
   // Represent the target dependency graph.  The entry at each
   // top-level index corresponds to a depender whose dependencies are
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5d22cd7..23f676a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1345,9 +1345,9 @@ bool cmGlobalGenerator::ComputeTargetDepends()
     {
     return false;
     }
-  std::vector<cmTarget const*> const& targets = ctd.GetTargets();
-  for(std::vector<cmTarget const*>::const_iterator ti = targets.begin();
-      ti != targets.end(); ++ti)
+  std::vector<cmGeneratorTarget const*> const& targets = ctd.GetTargets();
+  for(std::vector<cmGeneratorTarget const*>::const_iterator ti
+      = targets.begin(); ti != targets.end(); ++ti)
     {
     ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]);
     }
@@ -2043,12 +2043,12 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
         // Add dependencies of the included target.  An excluded
         // target may still be included if it is a dependency of a
         // non-excluded target.
-        TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target);
+        TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(gt);
         for(TargetDependSet::const_iterator ti = tgtdeps.begin();
             ti != tgtdeps.end(); ++ti)
           {
-          cmTarget const* ttt = *ti;
-          targetSet.insert(ttt);
+          cmGeneratorTarget const* ttt = *ti;
+          targetSet.insert(ttt->Target);
           }
         }
       }
@@ -2510,9 +2510,9 @@ void cmGlobalGenerator::AppendDirectoryForConfig(const std::string&,
 
 //----------------------------------------------------------------------------
 cmGlobalGenerator::TargetDependSet const&
-cmGlobalGenerator::GetTargetDirectDepends(cmTarget const& target)
+cmGlobalGenerator::GetTargetDirectDepends(cmGeneratorTarget const* target)
 {
-  return this->TargetDependencies[&target];
+  return this->TargetDependencies[target];
 }
 
 void cmGlobalGenerator::AddTarget(cmTarget* t)
@@ -2612,9 +2612,10 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
         continue;
         }
       // put the target in the set of original targets
-      originalTargets.insert(target);
+      cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
+      originalTargets.insert(gt);
       // Get the set of targets that depend on target
-      this->AddTargetDepends(target, projectTargets);
+      this->AddTargetDepends(gt, projectTargets);
       }
     }
 }
@@ -2627,7 +2628,7 @@ bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target) const
 }
 
 //----------------------------------------------------------------------------
-void cmGlobalGenerator::AddTargetDepends(cmTarget const* target,
+void cmGlobalGenerator::AddTargetDepends(cmGeneratorTarget const* target,
                                          TargetDependSet& projectTargets)
 {
   // add the target itself
@@ -2635,11 +2636,10 @@ void cmGlobalGenerator::AddTargetDepends(cmTarget const* target,
     {
     // This is the first time we have encountered the target.
     // Recursively follow its dependencies.
-    TargetDependSet const& ts = this->GetTargetDirectDepends(*target);
+    TargetDependSet const& ts = this->GetTargetDirectDepends(target);
     for(TargetDependSet::const_iterator i = ts.begin(); i != ts.end(); ++i)
       {
-      cmTarget const* dtarget = *i;
-      this->AddTargetDepends(dtarget, projectTargets);
+      this->AddTargetDepends(*i, projectTargets);
       }
     }
 }
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 8c092c0..bb5af5d 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -292,7 +292,8 @@ public:
 
   // what targets does the specified target depend on directly
   // via a target_link_libraries or add_dependencies
-  TargetDependSet const& GetTargetDirectDepends(cmTarget const& target);
+  TargetDependSet const& GetTargetDirectDepends(
+      const cmGeneratorTarget* target);
 
   /** Get per-target generator information.  */
   cmGeneratorTarget* GetGeneratorTarget(cmTarget const*) const;
@@ -368,7 +369,7 @@ protected:
                              TargetDependSet& originalTargets,
                              cmLocalGenerator* root, GeneratorVector const&);
   bool IsRootOnlyTarget(cmTarget* target) const;
-  void AddTargetDepends(cmTarget const* target,
+  void AddTargetDepends(const cmGeneratorTarget* target,
                         TargetDependSet& projectTargets);
   void SetLanguageEnabledFlag(const std::string& l, cmMakefile* mf);
   void SetLanguageEnabledMaps(const std::string& l, cmMakefile* mf);
@@ -477,7 +478,7 @@ private:
   std::vector<std::string> FilesReplacedDuringGenerate;
 
   // Store computed inter-target dependencies.
-  typedef std::map<cmTarget const*, TargetDependSet> TargetDependMap;
+  typedef std::map<cmGeneratorTarget const*, TargetDependSet> TargetDependMap;
   TargetDependMap TargetDependencies;
 
   // Per-target generator information.
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 103d75a..722294b 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -949,8 +949,8 @@ cmGlobalNinjaGenerator
     std::set<std::string> const& utils = target->GetUtilities();
     std::copy(utils.begin(), utils.end(), std::back_inserter(outputs));
   } else {
-    cmTargetDependSet const& targetDeps =
-      this->GetTargetDirectDepends(*target);
+    cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
+    cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(gt);
     for (cmTargetDependSet::const_iterator i = targetDeps.begin();
          i != targetDeps.end(); ++i)
       {
@@ -958,7 +958,7 @@ cmGlobalNinjaGenerator
         {
         continue;
         }
-      this->AppendTargetOutputs(*i, outputs);
+      this->AppendTargetOutputs((*i)->Target, outputs);
     }
   }
 }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 6c34436..acc72af 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -804,7 +804,7 @@ cmGlobalUnixMakefileGenerator3
       lg->AppendEcho(commands, "Built target " + name,
         cmLocalUnixMakefileGenerator3::EchoNormal, &progress);
 
-      this->AppendGlobalTargetDepends(depends,*gtarget->Target);
+      this->AppendGlobalTargetDepends(depends, gtarget);
       lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
                         localName, depends, commands, true);
 
@@ -832,7 +832,7 @@ cmGlobalUnixMakefileGenerator3
       //
       std::set<cmTarget const*> emitted;
       progCmd << " "
-              << this->CountProgressMarksInTarget(gtarget->Target, emitted);
+              << this->CountProgressMarksInTarget(gtarget, emitted);
       commands.push_back(progCmd.str());
       }
       std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
@@ -908,14 +908,14 @@ cmGlobalUnixMakefileGenerator3
 //----------------------------------------------------------------------------
 size_t
 cmGlobalUnixMakefileGenerator3
-::CountProgressMarksInTarget(cmTarget const* target,
+::CountProgressMarksInTarget(cmGeneratorTarget const* target,
                              std::set<cmTarget const*>& emitted)
 {
   size_t count = 0;
-  if(emitted.insert(target).second)
+  if(emitted.insert(target->Target).second)
     {
-    count = this->ProgressMap[target].Marks.size();
-    TargetDependSet const& depends = this->GetTargetDirectDepends(*target);
+    count = this->ProgressMap[target->Target].Marks.size();
+    TargetDependSet const& depends = this->GetTargetDirectDepends(target);
     for(TargetDependSet::const_iterator di = depends.begin();
         di != depends.end(); ++di)
       {
@@ -941,7 +941,8 @@ cmGlobalUnixMakefileGenerator3
   for(std::set<cmTarget const*>::const_iterator t = targets.begin();
       t != targets.end(); ++t)
     {
-    count += this->CountProgressMarksInTarget(*t, emitted);
+    cmGeneratorTarget* gt = this->GetGeneratorTarget(*t);
+    count += this->CountProgressMarksInTarget(gt, emitted);
     }
   return count;
 }
@@ -987,22 +988,21 @@ cmGlobalUnixMakefileGenerator3::TargetProgress
 void
 cmGlobalUnixMakefileGenerator3
 ::AppendGlobalTargetDepends(std::vector<std::string>& depends,
-                            cmTarget& target)
+                            cmGeneratorTarget* target)
 {
   TargetDependSet const& depends_set = this->GetTargetDirectDepends(target);
   for(TargetDependSet::const_iterator i = depends_set.begin();
       i != depends_set.end(); ++i)
     {
     // Create the target-level dependency.
-    cmTarget const* dep = *i;
+    cmGeneratorTarget const* dep = *i;
     if (dep->GetType() == cmTarget::INTERFACE_LIBRARY)
       {
       continue;
       }
     cmLocalUnixMakefileGenerator3* lg3 =
-      static_cast<cmLocalUnixMakefileGenerator3*>
-      (dep->GetMakefile()->GetLocalGenerator());
-    std::string tgtName = lg3->GetRelativeTargetDirectory(*dep);
+      static_cast<cmLocalUnixMakefileGenerator3*>(dep->GetLocalGenerator());
+    std::string tgtName = lg3->GetRelativeTargetDirectory(*(*dep).Target);
     tgtName += "/all";
     depends.push_back(tgtName);
     }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index a639ff0..8805011 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -153,7 +153,7 @@ protected:
                             cmLocalUnixMakefileGenerator3* lg);
 
   void AppendGlobalTargetDepends(std::vector<std::string>& depends,
-                                 cmTarget& target);
+                                 cmGeneratorTarget* target);
 
   // does this generator need a requires step for any of its targets
   bool NeedRequiresStep(cmTarget const&);
@@ -198,7 +198,7 @@ protected:
                    cmStrictTargetComparison> ProgressMapType;
   ProgressMapType ProgressMap;
 
-  size_t CountProgressMarksInTarget(cmTarget const* target,
+  size_t CountProgressMarksInTarget(cmGeneratorTarget const* target,
                                     std::set<cmTarget const*>& emitted);
   size_t CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg);
 
diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h
index 1feb072..c5059ee 100644
--- a/Source/cmTargetDepend.h
+++ b/Source/cmTargetDepend.h
@@ -14,23 +14,24 @@
 
 #include "cmStandardIncludes.h"
 
-class cmTarget;
+class cmGeneratorTarget;
 
 /** One edge in the global target dependency graph.
     It may be marked as a 'link' or 'util' edge or both.  */
 class cmTargetDepend
 {
-  cmTarget const* Target;
+  cmGeneratorTarget const* Target;
 
   // The set order depends only on the Target, so we use
   // mutable members to acheive a map with set syntax.
   mutable bool Link;
   mutable bool Util;
 public:
-  cmTargetDepend(cmTarget const* t): Target(t), Link(false), Util(false) {}
-  operator cmTarget const*() const { return this->Target; }
-  cmTarget const* operator->() const { return this->Target; }
-  cmTarget const& operator*() const { return *this->Target; }
+  cmTargetDepend(cmGeneratorTarget const* t)
+    : Target(t), Link(false), Util(false) {}
+  operator cmGeneratorTarget const*() const { return this->Target; }
+  cmGeneratorTarget const* operator->() const { return this->Target; }
+  cmGeneratorTarget const& operator*() const { return *this->Target; }
   friend bool operator < (cmTargetDepend const& l, cmTargetDepend const& r)
     { return l.Target < r.Target; }
   void SetType(bool strong) const

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5a805f2f36aaeb183ec7a2e9f7b7736381a06ff
commit b5a805f2f36aaeb183ec7a2e9f7b7736381a06ff
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:59:06 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:32:18 2015 +0200

    Get the local generator from the GeneratorTarget.
    
    The Makefile should not know the LocalGenerator at all

diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 7e9ccf3..dd60a1f 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1154,8 +1154,10 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
                 && linkee->GetType() != cmTarget::INTERFACE_LIBRARY
                 && emitted.insert(linkee).second)
         {
+        cmGeneratorTarget* gt =
+            this->GlobalGenerator->GetGeneratorTarget(linkee);
+        cmLocalGenerator* lg = gt->GetLocalGenerator();
         cmMakefile* mf = linkee->GetMakefile();
-        cmLocalGenerator* lg = mf->GetLocalGenerator();
         std::string di = mf->GetCurrentBinaryDirectory();
         di += "/";
         di += lg->GetTargetDirectory(*linkee);
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index a8eef82..3bc0eb7 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -22,7 +22,7 @@ cmOSXBundleGenerator(cmGeneratorTarget* target,
                      const std::string& configName)
  : GT(target)
  , Makefile(target->Target->GetMakefile())
- , LocalGenerator(Makefile->GetLocalGenerator())
+ , LocalGenerator(target->GetLocalGenerator())
  , ConfigName(configName)
  , MacContentFolders(0)
 {
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 89ad02f..3d6ef57 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -521,10 +521,10 @@ static void GetCompileDefinitionsAndDirectories(cmTarget const* target,
                                                 std::string &defs)
 {
   cmMakefile* makefile = target->GetMakefile();
-  cmLocalGenerator* localGen = makefile->GetLocalGenerator();
+  cmGlobalGenerator* globalGen = makefile->GetGlobalGenerator();
   std::vector<std::string> includeDirs;
-  cmGeneratorTarget *gtgt = localGen->GetGlobalGenerator()
-                                    ->GetGeneratorTarget(target);
+  cmGeneratorTarget *gtgt = globalGen->GetGeneratorTarget(target);
+  cmLocalGenerator *localGen = gtgt->GetLocalGenerator();
   // Get the include dirs for this target, without stripping the implicit
   // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
   localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false);
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 9b78df3..12a1e42 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -176,7 +176,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target,
   this->Makefile->GetConfigurations(this->Configurations);
   this->LocalGenerator =
     (cmLocalVisualStudio7Generator*)
-    this->Makefile->GetLocalGenerator();
+    this->GeneratorTarget->GetLocalGenerator();
   this->Name = this->Target->GetName();
   this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str());
   this->Platform = gg->GetPlatformName();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=010092def04d5cf9cb37d47a4b1d0e5901a23c7f
commit 010092def04d5cf9cb37d47a4b1d0e5901a23c7f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:57:26 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:59 2015 +0200

    cmMakefileTargetGenerator: Require cmGeneratorTarget.

diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 37b297e..416063f 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -22,7 +22,7 @@
 //----------------------------------------------------------------------------
 cmMakefileExecutableTargetGenerator
 ::cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target):
-  cmMakefileTargetGenerator(target->Target)
+  cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnDepends;
   this->Target->GetExecutableNames(
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 450f573..660027c 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -22,7 +22,7 @@
 //----------------------------------------------------------------------------
 cmMakefileLibraryTargetGenerator
 ::cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target):
-  cmMakefileTargetGenerator(target->Target)
+  cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnDepends;
   if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 923aa7b..7e9ccf3 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -32,7 +32,7 @@
 
 #include <ctype.h>
 
-cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
+cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
   : OSXBundleGenerator(0)
   , MacOSXContentGenerator(0)
 {
@@ -41,16 +41,15 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
   this->FlagFileStream = 0;
   this->CustomCommandDriver = OnBuild;
   this->FortranModuleDirectoryComputed = false;
-  this->Target = target;
+  this->Target = target->Target;
   this->Makefile = this->Target->GetMakefile();
   this->LocalGenerator =
-    static_cast<cmLocalUnixMakefileGenerator3*>(
-      this->Makefile->GetLocalGenerator());
+    static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
   this->ConfigName = this->LocalGenerator->ConfigurationName.c_str();
   this->GlobalGenerator =
     static_cast<cmGlobalUnixMakefileGenerator3*>(
       this->LocalGenerator->GetGlobalGenerator());
-  this->GeneratorTarget = this->GlobalGenerator->GetGeneratorTarget(target);
+  this->GeneratorTarget = target;
   cmake* cm = this->GlobalGenerator->GetCMakeInstance();
   this->NoRuleMessages = false;
   if(const char* ruleStatus = cm->GetState()
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 2e1b052..9182236 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -34,7 +34,7 @@ class cmMakefileTargetGenerator
 {
 public:
   // constructor to set the ivars
-  cmMakefileTargetGenerator(cmTarget* target);
+  cmMakefileTargetGenerator(cmGeneratorTarget* target);
   virtual ~cmMakefileTargetGenerator();
 
   // construct using this factory call
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx
index 25d929c..303ca63 100644
--- a/Source/cmMakefileUtilityTargetGenerator.cxx
+++ b/Source/cmMakefileUtilityTargetGenerator.cxx
@@ -21,7 +21,7 @@
 //----------------------------------------------------------------------------
 cmMakefileUtilityTargetGenerator
 ::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target):
-  cmMakefileTargetGenerator(target->Target)
+  cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnUtility;
   this->OSXBundleGenerator = new cmOSXBundleGenerator(target,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74ed9a8c5943e043ec3b24d9f55d900b26b61205
commit 74ed9a8c5943e043ec3b24d9f55d900b26b61205
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:02:24 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:59 2015 +0200

    cmNinjaGenerator: Require cmGeneratorTarget.

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index bbf03ff..2fe53bf 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -32,7 +32,7 @@
 
 cmNinjaNormalTargetGenerator::
 cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
-  : cmNinjaTargetGenerator(target->Target)
+  : cmNinjaTargetGenerator(target)
   , TargetNameOut()
   , TargetNameSO()
   , TargetNameReal()
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b2aef68..fcf4a62 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -56,19 +56,18 @@ cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
     }
 }
 
-cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmTarget* target)
+cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmGeneratorTarget* target)
   :
     MacOSXContentGenerator(0),
     OSXBundleGenerator(0),
     MacContentFolders(),
-    Target(target),
-    Makefile(target->GetMakefile()),
+    Target(target->Target),
+    Makefile(target->Makefile),
     LocalGenerator(
-      static_cast<cmLocalNinjaGenerator*>(Makefile->GetLocalGenerator())),
+      static_cast<cmLocalNinjaGenerator*>(target->GetLocalGenerator())),
     Objects()
 {
-  this->GeneratorTarget =
-    this->GetGlobalGenerator()->GetGeneratorTarget(target);
+  this->GeneratorTarget = target;
   MacOSXContentGenerator = new MacOSXContentGeneratorType(this);
 }
 
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 4e7d8b3..fc361b2 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -33,7 +33,7 @@ public:
   static cmNinjaTargetGenerator* New(cmGeneratorTarget* target);
 
   /// Build a NinjaTargetGenerator.
-  cmNinjaTargetGenerator(cmTarget* target);
+  cmNinjaTargetGenerator(cmGeneratorTarget* target);
 
   /// Destructor.
   virtual ~cmNinjaTargetGenerator();
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 42d6b46..c3bf011 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -21,7 +21,7 @@
 
 cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(
     cmGeneratorTarget *target)
-  : cmNinjaTargetGenerator(target->Target) {}
+  : cmNinjaTargetGenerator(target) {}
 
 cmNinjaUtilityTargetGenerator::~cmNinjaUtilityTargetGenerator() {}
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=812496a6a94eb46290b63a69a831658165893a06
commit 812496a6a94eb46290b63a69a831658165893a06
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:14:04 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:59 2015 +0200

    cmGeneratorTarget: Require a cmLocalGenerator to construct.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 1c25f59..7aeb613 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -220,11 +220,12 @@ struct TagVisitor
 };
 
 //----------------------------------------------------------------------------
-cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t),
+cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
+  : Target(t),
   SourceFileFlagsConstructed(false)
 {
   this->Makefile = this->Target->GetMakefile();
-  this->LocalGenerator = this->Makefile->GetLocalGenerator();
+  this->LocalGenerator = lg;
   this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
 }
 
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 645b792..675ee9f 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -24,7 +24,7 @@ class cmTarget;
 class cmGeneratorTarget
 {
 public:
-  cmGeneratorTarget(cmTarget*);
+  cmGeneratorTarget(cmTarget*, cmLocalGenerator* lg);
 
   cmLocalGenerator* GetLocalGenerator() const;
 
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 185756b..5d22cd7 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1460,7 +1460,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
       ti != targets.end(); ++ti)
     {
     cmTarget* t = &ti->second;
-    cmGeneratorTarget* gt = new cmGeneratorTarget(t);
+    cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
     this->ComputeTargetObjectDirectory(gt);
     this->GeneratorTargets[t] = gt;
     generatorTargets[t] = gt;
@@ -1470,7 +1470,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
         j = mf->GetOwnedImportedTargets().begin();
       j != mf->GetOwnedImportedTargets().end(); ++j)
     {
-    cmGeneratorTarget* gt = new cmGeneratorTarget(*j);
+    cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg);
     this->GeneratorTargets[*j] = gt;
     generatorTargets[*j] = gt;
     }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6abd2a91bd952aab90b8954d44284ee670916afc
commit 6abd2a91bd952aab90b8954d44284ee670916afc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:09:35 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:59 2015 +0200

    cmGlobalGenerator: Base exclusion computation on cmGeneratorTarget.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index fbdccac..185756b 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1955,10 +1955,10 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
 }
 
 bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
-                                   cmTarget const& target) const
+                                   cmGeneratorTarget* target) const
 {
-  if(target.GetType() == cmTarget::INTERFACE_LIBRARY
-      || target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
+  if(target->GetType() == cmTarget::INTERFACE_LIBRARY
+      || target->Target->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
     {
     // This target is excluded from its directory.
     return true;
@@ -1967,7 +1967,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
     {
     // This target is included in its directory.  Check whether the
     // directory is excluded.
-    return this->IsExcluded(root, target.GetMakefile()->GetLocalGenerator());
+    return this->IsExcluded(root, target->GetLocalGenerator());
     }
 }
 
@@ -2028,9 +2028,11 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
       {
       cmTarget const& target = t->second;
 
+      cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
+
       // Consider the directory containing the target and all its
       // parents until something excludes the target.
-      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, target);
+      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt);
           clg = clg->GetParent())
         {
         // This local generator includes the target.
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index d606cc9..8c092c0 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -390,7 +390,7 @@ protected:
   void FillProjectMap();
   void CheckLocalGenerators();
   bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
-  bool IsExcluded(cmLocalGenerator* root, cmTarget const& target) const;
+  bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
   void FillLocalGeneratorToTargetMap();
   void CreateDefaultGlobalTargets(cmTargets* targets);
   cmTarget CreateGlobalTarget(const std::string& name, const char* message,
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index ffd1cdc..0d3177c 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -289,7 +289,7 @@ public:
   const std::vector<cmLocalGenerator*>& GetLocalGenerators() const {
     return LocalGenerators; }
 
-  bool IsExcluded(cmLocalGenerator* root, cmTarget& target) {
+  bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) {
     return cmGlobalGenerator::IsExcluded(root, target); }
 
   int GetRuleCmdLength(const std::string& name) {
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 0f61225..6c34436 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -809,7 +809,7 @@ cmGlobalUnixMakefileGenerator3
                         localName, depends, commands, true);
 
       // add the all/all dependency
-      if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
+      if(!this->IsExcluded(this->LocalGenerators[0], gtarget))
         {
         depends.clear();
         depends.push_back(localName);
@@ -877,7 +877,7 @@ cmGlobalUnixMakefileGenerator3
                           "Pre-install relink rule for target.",
                           localName, depends, commands, true);
 
-        if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
+        if(!this->IsExcluded(this->LocalGenerators[0], gtarget))
           {
           depends.clear();
           depends.push_back(localName);
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 4db36fc..aac85f9 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -91,7 +91,7 @@ void cmLocalNinjaGenerator::Generate()
       // Add the target to "all" if required.
       if (!this->GetGlobalNinjaGenerator()->IsExcluded(
             this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0],
-            *t->second->Target))
+            t->second))
         this->GetGlobalNinjaGenerator()->AddDependencyToAll(t->second->Target);
       delete tg;
       }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e06e2c16a14b2095fb3f4aed5cacfbe12bad1657
commit e06e2c16a14b2095fb3f4aed5cacfbe12bad1657
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:12:24 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:59 2015 +0200

    cmGlobalGenerator: Create GeneratorTargets with a local generator.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index bd949bb..fbdccac 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1451,9 +1451,10 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
 }
 
 //----------------------------------------------------------------------------
-void cmGlobalGenerator::CreateGeneratorTargets(cmMakefile *mf)
+void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
 {
   cmGeneratorTargetsType generatorTargets;
+  cmMakefile* mf = lg->GetMakefile();
   cmTargets& targets = mf->GetTargets();
   for(cmTargets::iterator ti = targets.begin();
       ti != targets.end(); ++ti)
@@ -1482,7 +1483,7 @@ void cmGlobalGenerator::CreateGeneratorTargets()
   // Construct per-target generator information.
   for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
     {
-    this->CreateGeneratorTargets(this->LocalGenerators[i]->GetMakefile());
+    this->CreateGeneratorTargets(this->LocalGenerators[i]);
     }
 }
 
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index f02df90..d606cc9 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -483,7 +483,7 @@ private:
   // Per-target generator information.
   cmGeneratorTargetsType GeneratorTargets;
   friend class cmake;
-  void CreateGeneratorTargets(cmMakefile* mf);
+  void CreateGeneratorTargets(cmLocalGenerator* lg);
   void CreateGeneratorTargets();
 
   void ClearGeneratorMembers();
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index eeb6575..6ff388d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -482,7 +482,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
     std::string linkPath;
     std::string flags;
     std::string linkFlags;
-    gg->CreateGeneratorTargets(mf);
+    gg->CreateGeneratorTargets(lg.get());
     cmGeneratorTarget *gtgt = gg->GetGeneratorTarget(tgt);
     lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
                        gtgt, false);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f7740f1342241af4a82b67379b12c2e88fe97f7
commit 0f7740f1342241af4a82b67379b12c2e88fe97f7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:02:59 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:58 2015 +0200

    GHS: Use a cmGeneratorTarget in generator API.

diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 01e2011..f4c9a83 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -21,11 +21,11 @@
 
 std::string const cmGhsMultiTargetGenerator::DDOption("-dynamic");
 
-cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmTarget *target)
-  : Target(target)
+cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget *target)
+  : Target(target->Target)
   , LocalGenerator(static_cast<cmLocalGhsMultiGenerator *>(
-                     target->GetMakefile()->GetLocalGenerator()))
-  , Makefile(target->GetMakefile())
+                     target->GetLocalGenerator()))
+  , Makefile(target->Target->GetMakefile())
   , TargetGroup(DetermineIfTargetGroup(target))
   , DynamicDownload(false)
 {
diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h
index 8e81db8..fc9532a 100644
--- a/Source/cmGhsMultiTargetGenerator.h
+++ b/Source/cmGhsMultiTargetGenerator.h
@@ -27,7 +27,7 @@ class cmCustomCommand;
 class cmGhsMultiTargetGenerator
 {
 public:
-  cmGhsMultiTargetGenerator(cmTarget *target);
+  cmGhsMultiTargetGenerator(cmGeneratorTarget* target);
 
   virtual ~cmGhsMultiTargetGenerator();
 
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx
index 870b9b9..8e498dd 100644
--- a/Source/cmLocalGhsMultiGenerator.cxx
+++ b/Source/cmLocalGhsMultiGenerator.cxx
@@ -37,7 +37,7 @@ void cmLocalGhsMultiGenerator::Generate()
       {
       continue;
       }
-    cmGhsMultiTargetGenerator tg(l->second->Target);
+    cmGhsMultiTargetGenerator tg(l->second);
     tg.Generate();
     }
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2045137c5a2c98fe92bd8f67c50c55397c176854
commit 2045137c5a2c98fe92bd8f67c50c55397c176854
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 12:59:25 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:58 2015 +0200

    cmGeneratorTarget: Add accessor for cmLocalGenerator.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 67d0d54..1c25f59 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -228,6 +228,11 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t),
   this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
 }
 
+cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const
+{
+  return this->LocalGenerator;
+}
+
 //----------------------------------------------------------------------------
 int cmGeneratorTarget::GetType() const
 {
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index a8edcb8..645b792 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -26,6 +26,8 @@ class cmGeneratorTarget
 public:
   cmGeneratorTarget(cmTarget*);
 
+  cmLocalGenerator* GetLocalGenerator() const;
+
   int GetType() const;
   std::string GetName() const;
   const char *GetProperty(const std::string& prop) const;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32857d96bf17ba9943c26b3ae42eb744f01efa4b
commit 32857d96bf17ba9943c26b3ae42eb744f01efa4b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:00:51 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:58 2015 +0200

    C::B: Get the Makefile from the LocalGenerator, not vice-versa.
    
    The Makefile is a configure-time concept, and the LocalGenerator
    is a generate time concept.  The LocalGenerator should not be available
    from the Makefile.

diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index e374387..a31e832 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -313,7 +313,7 @@ void cmExtraCodeBlocksGenerator
         "      "<<virtualFolders<<"\n"
         "      <Build>\n";
 
-  this->AppendTarget(fout, "all", 0, make.c_str(), mf, compiler.c_str());
+  this->AppendTarget(fout, "all", 0, make.c_str(), lgs[0], compiler.c_str());
 
   // add all executable and library targets and some of the GLOBAL
   // and UTILITY targets
@@ -335,7 +335,7 @@ void cmExtraCodeBlocksGenerator
                      makefile->GetHomeOutputDirectory())==0)
             {
             this->AppendTarget(fout, ti->first, 0,
-                               make.c_str(), makefile, compiler.c_str());
+                               make.c_str(), *lg, compiler.c_str());
             }
           }
           break;
@@ -351,7 +351,7 @@ void cmExtraCodeBlocksGenerator
             }
 
           this->AppendTarget(fout, ti->first, 0,
-                                 make.c_str(), makefile, compiler.c_str());
+                                 make.c_str(), *lg, compiler.c_str());
           break;
         case cmTarget::EXECUTABLE:
         case cmTarget::STATIC_LIBRARY:
@@ -360,11 +360,11 @@ void cmExtraCodeBlocksGenerator
         case cmTarget::OBJECT_LIBRARY:
           {
           this->AppendTarget(fout, ti->first, &ti->second,
-                             make.c_str(), makefile, compiler.c_str());
+                             make.c_str(), *lg, compiler.c_str());
           std::string fastTarget = ti->first;
           fastTarget += "/fast";
           this->AppendTarget(fout, fastTarget, &ti->second,
-                             make.c_str(), makefile, compiler.c_str());
+                             make.c_str(), *lg, compiler.c_str());
           }
           break;
         default:
@@ -519,14 +519,16 @@ void cmExtraCodeBlocksGenerator
 
 // Write a dummy file for OBJECT libraries, so C::B can reference some file
 std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile(
-                                        cmMakefile* mf, cmTarget* target) const
+                                        cmLocalGenerator* lg,
+                                        cmTarget* target) const
 {
+  cmMakefile *mf = lg->GetMakefile();
   // this file doesn't seem to be used by C::B in custom makefile mode,
   // but we generate a unique file for each OBJECT library so in case
   // C::B uses it in some way, the targets don't interfere with each other.
   std::string filename = mf->GetCurrentBinaryDirectory();
   filename += "/";
-  filename += mf->GetLocalGenerator()->GetTargetDirectory(*target);
+  filename += lg->GetTargetDirectory(*target);
   filename += "/";
   filename += target->GetName();
   filename += ".objlib";
@@ -547,9 +549,10 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
                                               const std::string& targetName,
                                               cmTarget* target,
                                               const char* make,
-                                              const cmMakefile* makefile,
+                                              const cmLocalGenerator* lg,
                                               const char* compiler)
 {
+  cmMakefile const* makefile = lg->GetMakefile();
   std::string makefileName = makefile->GetCurrentBinaryDirectory();
   makefileName += "/Makefile";
 
@@ -583,7 +586,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
     std::string location;
     if ( target->GetType()==cmTarget::OBJECT_LIBRARY)
       {
-      location = this->CreateDummyTargetFile(const_cast<cmMakefile*>(makefile),
+      location = this->CreateDummyTargetFile(const_cast<cmLocalGenerator*>(lg),
                                              target);
       }
     else
@@ -618,8 +621,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
     std::set<std::string> uniqIncludeDirs;
 
     std::vector<std::string> includes;
-    target->GetMakefile()->GetLocalGenerator()->
-      GetIncludeDirectories(includes, gtgt, "C", buildType);
+    lg->GetIncludeDirectories(includes, gtgt, "C", buildType);
 
     uniqIncludeDirs.insert(includes.begin(), includes.end());
 
diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h
index 97da1b8..e5ede9a 100644
--- a/Source/cmExtraCodeBlocksGenerator.h
+++ b/Source/cmExtraCodeBlocksGenerator.h
@@ -48,7 +48,8 @@ private:
 
   void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
                                 const std::string& filename);
-  std::string CreateDummyTargetFile(cmMakefile* mf, cmTarget* target) const;
+  std::string CreateDummyTargetFile(cmLocalGenerator* lg,
+                                    cmTarget* target) const;
 
   std::string GetCBCompilerId(const cmMakefile* mf);
   int GetCBTargetType(cmTarget* target);
@@ -58,7 +59,7 @@ private:
                     const std::string& targetName,
                     cmTarget* target,
                     const char* make,
-                    const cmMakefile* makefile,
+                    const cmLocalGenerator* lg,
                     const char* compiler);
 
 };

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5ef691b27eff45bd77b5f09e86a0bc9f69a1b4a
commit f5ef691b27eff45bd77b5f09e86a0bc9f69a1b4a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 12:57:19 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:58 2015 +0200

    cmLocalGenerator: Constify GetIncludeDirectories method.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 5d0394f..2587764 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1330,7 +1330,7 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
                                              const std::string& lang,
                                              const std::string& config,
                                              bool stripImplicitInclDirs
-                                            )
+                                            ) const
 {
   // Need to decide whether to automatically include the source and
   // binary directories at the beginning of the include path.
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index de9a177..9b1dfaf 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -185,7 +185,7 @@ public:
                              cmGeneratorTarget* target,
                              const std::string& lang = "C",
                              const std::string& config = "",
-                             bool stripImplicitInclDirs = true);
+                             bool stripImplicitInclDirs = true) const;
   void AddCompileOptions(std::string& flags, cmTarget* target,
                          const std::string& lang, const std::string& config);
   void AddCompileDefinitions(std::set<std::string>& defines,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eaeccc5fc9bea3227c3bf1d6a4da915fd1eea627
commit eaeccc5fc9bea3227c3bf1d6a4da915fd1eea627
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:59:22 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:58 2015 +0200

    QtAutogen: Get the global generator from the Makefile.

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index ef32c75..89ad02f 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -368,8 +368,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
   bool usePRE_BUILD = false;
-  cmLocalGenerator* localGen = makefile->GetLocalGenerator();
-  cmGlobalGenerator* gg = localGen->GetGlobalGenerator();
+  cmGlobalGenerator* gg = makefile->GetGlobalGenerator();
   if(gg->GetName().find("Visual Studio") != std::string::npos)
     {
     cmGlobalVisualStudioGenerator* vsgg =

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e8c521268f4aa496e9aec9130a1f4d9a4654ec4
commit 6e8c521268f4aa496e9aec9130a1f4d9a4654ec4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:07:15 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:58 2015 +0200

    cmMakefile: Move IsRoot API from cmLocalGenerator.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 4fe52dd..0f61225 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -529,7 +529,7 @@ cmGlobalUnixMakefileGenerator3
                        cmLocalUnixMakefileGenerator3* lg)
 {
   // Only subdirectories need these rules.
-  if(lg->IsRootMakefile())
+  if(lg->GetMakefile()->IsRootMakefile())
     {
     return;
     }
@@ -1034,7 +1034,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule
       static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
     // for the passed in makefile or if this is the top Makefile wripte out
     // the targets
-    if (lg2 == lg || lg->IsRootMakefile())
+    if (lg2 == lg || lg->GetMakefile()->IsRootMakefile())
       {
       // for each target Generate the rule files for each target.
       cmTargets& targets = lg2->GetMakefile()->GetTargets();
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 5ed53d0..5d0394f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -68,11 +68,6 @@ cmLocalGenerator::~cmLocalGenerator()
   delete this->Makefile;
 }
 
-bool cmLocalGenerator::IsRootMakefile() const
-{
-  return !this->StateSnapshot.GetBuildsystemDirectoryParent().IsValid();
-}
-
 //----------------------------------------------------------------------------
 void cmLocalGenerator::ComputeObjectMaxPath()
 {
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index efdd487..de9a177 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -39,9 +39,6 @@ public:
                    cmState::Snapshot snapshot);
   virtual ~cmLocalGenerator();
 
-  /// @return whether we are processing the top CMakeLists.txt file.
-  bool IsRootMakefile() const;
-
   /**
    * Generate the makefile for this directory.
    */
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 427ae10..4db36fc 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -58,7 +58,7 @@ void cmLocalNinjaGenerator::Generate()
 #endif
 
   // We do that only once for the top CMakeLists.txt file.
-  if(this->IsRootMakefile())
+  if(this->Makefile->IsRootMakefile())
     {
     this->WriteBuildFileTop();
 
@@ -298,7 +298,7 @@ void cmLocalNinjaGenerator::WriteProcessedMakefile(std::ostream& os)
     << "# Write statements declared in CMakeLists.txt:" << std::endl
     << "# "
     << this->Makefile->GetDefinition("CMAKE_CURRENT_LIST_FILE") << std::endl;
-  if(this->IsRootMakefile())
+  if(this->Makefile->IsRootMakefile())
     os << "# Which is the root file." << std::endl;
   cmGlobalNinjaGenerator::WriteDivider(os);
   os << std::endl;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6a99edd..bc9f9d6 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1608,6 +1608,11 @@ void cmMakefile::PopMacroScope(bool reportError)
   this->PopFunctionBlockerBarrier(reportError);
 }
 
+bool cmMakefile::IsRootMakefile() const
+{
+  return !this->StateSnapshot.GetBuildsystemDirectoryParent().IsValid();
+}
+
 //----------------------------------------------------------------------------
 class cmMakefileCurrent
 {
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 6f6ed27..aef6c9e 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -79,6 +79,9 @@ public:
    */
   ~cmMakefile();
 
+  /// @return whether we are processing the top CMakeLists.txt file.
+  bool IsRootMakefile() const;
+
   bool ReadListFile(const char* listfile);
 
   bool ReadDependentFile(const char* listfile, bool noPolicyScope = true);
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 176cb0d..2e17a7d 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -53,7 +53,7 @@ bool cmProjectCommand
   // CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build
   // will work.
   if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME")
-     || (this->Makefile->GetLocalGenerator()->IsRootMakefile()))
+     || (this->Makefile->IsRootMakefile()))
     {
     this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str());
     this->Makefile->AddCacheDefinition

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbe3fc87bd9389ea028b9f024f5d5d15ed81de57
commit dbe3fc87bd9389ea028b9f024f5d5d15ed81de57
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:39:27 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:32 2015 +0200

    cmMakefile: Use member directly instead of through method.
    
    This function will not be around much longer anyway.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a8b163a..6a99edd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -105,7 +105,7 @@ public:
     ++it;
     if(it == this->VarStack.rend())
       {
-      cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent();
+      cmLocalGenerator* plg = mf->LocalGenerator->GetParent();
       if(!plg)
         {
         return false;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=84c26be931f7d24d51c478e52753c3c2204f7389
commit 84c26be931f7d24d51c478e52753c3c2204f7389
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:06:47 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 8 22:28:32 2015 +0200

    cmLocalUnixMakefileGenerator3: Remove unused method.

diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index dcb3016..78fe19d 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -147,9 +147,6 @@ public:
   void AddImplicitDepends(cmTarget const& tgt, const std::string& lang,
                           const char* obj, const char* src);
 
-  void AppendGlobalTargetDepends(std::vector<std::string>& depends,
-                                 cmTarget& target);
-
   // write the target rules for the local Makefile into the stream
   void WriteLocalAllRules(std::ostream& ruleFileStream);
 

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

Summary of changes:
 Source/cmComputeTargetDepends.cxx              |   81 +++++++++++++-----------
 Source/cmComputeTargetDepends.h                |   16 +++--
 Source/cmExtraCodeBlocksGenerator.cxx          |   24 +++----
 Source/cmExtraCodeBlocksGenerator.h            |    5 +-
 Source/cmGeneratorTarget.cxx                   |   10 ++-
 Source/cmGeneratorTarget.h                     |    4 +-
 Source/cmGhsMultiTargetGenerator.cxx           |    8 +--
 Source/cmGhsMultiTargetGenerator.h             |    2 +-
 Source/cmGlobalGenerator.cxx                   |   52 +++++++--------
 Source/cmGlobalGenerator.h                     |   13 ++--
 Source/cmGlobalNinjaGenerator.cxx              |    6 +-
 Source/cmGlobalNinjaGenerator.h                |    2 +-
 Source/cmGlobalUnixMakefileGenerator3.cxx      |   37 ++++++-----
 Source/cmGlobalUnixMakefileGenerator3.h        |    6 +-
 Source/cmLocalGenerator.cxx                    |    7 +-
 Source/cmLocalGenerator.h                      |    5 +-
 Source/cmLocalGhsMultiGenerator.cxx            |    2 +-
 Source/cmLocalNinjaGenerator.cxx               |    6 +-
 Source/cmLocalUnixMakefileGenerator3.h         |    3 -
 Source/cmMakefile.cxx                          |    7 +-
 Source/cmMakefile.h                            |    7 +-
 Source/cmMakefileExecutableTargetGenerator.cxx |    2 +-
 Source/cmMakefileLibraryTargetGenerator.cxx    |    2 +-
 Source/cmMakefileTargetGenerator.cxx           |   13 ++--
 Source/cmMakefileTargetGenerator.h             |    2 +-
 Source/cmMakefileUtilityTargetGenerator.cxx    |    2 +-
 Source/cmNinjaNormalTargetGenerator.cxx        |    2 +-
 Source/cmNinjaTargetGenerator.cxx              |   11 ++--
 Source/cmNinjaTargetGenerator.h                |    2 +-
 Source/cmNinjaUtilityTargetGenerator.cxx       |    2 +-
 Source/cmOSXBundleGenerator.cxx                |    2 +-
 Source/cmProjectCommand.cxx                    |    2 +-
 Source/cmQtAutoGenerators.cxx                  |    9 ++-
 Source/cmTargetDepend.h                        |   13 ++--
 Source/cmVisualStudio10TargetGenerator.cxx     |    2 +-
 Source/cmake.cxx                               |    2 +-
 36 files changed, 193 insertions(+), 178 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list