[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-581-gc9f6b5d

Stephen Kelly steveire at gmail.com
Sun Jun 21 15:20:52 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  c9f6b5dc97b82d5fbbf1d45e99e3f2bcda052768 (commit)
       via  054e13e2db7a6054e0014022eb319320ca78a137 (commit)
       via  3fd185801ce42f1267d9463abeb37913bd56eabb (commit)
       via  c1a69a460d2f3eb20ff7c3ed25ebd699e4f6fb66 (commit)
       via  63b2059ea92974bf2162ba2ee34c930906b7da9e (commit)
       via  ce7e0688d1792550a92cdb0530474160e7b20948 (commit)
       via  507f72acaa17aa336e928e05e1e3cc7d49c07bd1 (commit)
       via  5d1e88d7ac9fa35481b6acb9a2523c364dfd476c (commit)
       via  dbcb4464ac665b238087eeecd634d7ab51913713 (commit)
      from  2fc23bc53942df11b9107772eebd9f9a4b2c62a9 (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=c9f6b5dc97b82d5fbbf1d45e99e3f2bcda052768
commit c9f6b5dc97b82d5fbbf1d45e99e3f2bcda052768
Merge: 2fc23bc 054e13e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 15:20:51 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jun 21 15:20:51 2015 -0400

    Merge topic 'use-generator-target' into next
    
    054e13e2 Get the local generator from the GeneratorTarget.
    3fd18580 cmMakefileTargetGenerator: Require cmGeneratorTarget.
    c1a69a46 cmNinjaGenerator: Require cmGeneratorTarget.
    63b2059e cmGeneratorTarget: Require a cmLocalGenerator to construct.
    ce7e0688 cmGlobalGenerator: Create GeneratorTargets with a local generator.
    507f72ac GHS: Use a cmGeneratorTarget in generator API.
    5d1e88d7 cmGeneratorTarget: Add accessor for cmLocalGenerator.
    dbcb4464 C::B: Get the Makefile from the LocalGenerator, not vice-versa.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=054e13e2db7a6054e0014022eb319320ca78a137
commit 054e13e2db7a6054e0014022eb319320ca78a137
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:59:06 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:15:21 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 fa471c9..09fad5c 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1173,8 +1173,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 53fea83..b03e45a 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=3fd185801ce42f1267d9463abeb37913bd56eabb
commit 3fd185801ce42f1267d9463abeb37913bd56eabb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:57:26 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:15:21 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 402dfc6..fa471c9 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=c1a69a460d2f3eb20ff7c3ed25ebd699e4f6fb66
commit c1a69a460d2f3eb20ff7c3ed25ebd699e4f6fb66
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 14:02:24 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:15:20 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 6e35cd4..b18f368 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -57,19 +57,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=63b2059ea92974bf2162ba2ee34c930906b7da9e
commit 63b2059ea92974bf2162ba2ee34c930906b7da9e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:14:04 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:15:20 2015 +0200

    cmGeneratorTarget: Require a cmLocalGenerator to construct.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 482eefd..4494553 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 c4396c6..14eaeac 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1465,7 +1465,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;
@@ -1475,7 +1475,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=ce7e0688d1792550a92cdb0530474160e7b20948
commit ce7e0688d1792550a92cdb0530474160e7b20948
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:12:24 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:15:00 2015 +0200

    cmGlobalGenerator: Create GeneratorTargets with a local generator.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a462113..c4396c6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1456,9 +1456,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)
@@ -1487,7 +1488,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 e51b260..0570399 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -483,7 +483,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=507f72acaa17aa336e928e05e1e3cc7d49c07bd1
commit 507f72acaa17aa336e928e05e1e3cc7d49c07bd1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:02:59 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:14:59 2015 +0200

    GHS: Use a cmGeneratorTarget in generator API.

diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 01e2011..da371b1 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -21,23 +21,24 @@
 
 std::string const cmGhsMultiTargetGenerator::DDOption("-dynamic");
 
-cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmTarget *target)
-  : Target(target)
+cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget *target)
+  : Target(target->Target)
+  , GeneratorTarget(target)
   , LocalGenerator(static_cast<cmLocalGhsMultiGenerator *>(
-                     target->GetMakefile()->GetLocalGenerator()))
-  , Makefile(target->GetMakefile())
-  , TargetGroup(DetermineIfTargetGroup(target))
+                     target->GetLocalGenerator()))
+  , Makefile(target->Target->GetMakefile())
+  , TargetGroup(DetermineIfTargetGroup(target->Target))
   , DynamicDownload(false)
 {
-  this->RelBuildFilePath = this->GetRelBuildFilePath(target);
+  this->RelBuildFilePath = this->GetRelBuildFilePath(target->Target);
 
   this->RelOutputFileName =
     this->RelBuildFilePath + this->Target->GetName() + ".a";
 
   this->RelBuildFileName = this->RelBuildFilePath;
-  this->RelBuildFileName += this->GetBuildFileName(target);
+  this->RelBuildFileName += this->GetBuildFileName(target->Target);
 
-  std::string absPathToRoot = this->GetAbsPathToRoot(target);
+  std::string absPathToRoot = this->GetAbsPathToRoot(target->Target);
   absPathToRoot = this->AddSlashIfNeededToPath(absPathToRoot);
   this->AbsBuildFilePath = absPathToRoot + this->RelBuildFilePath;
   this->AbsBuildFileName = absPathToRoot + this->RelBuildFileName;
@@ -354,11 +355,11 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries()
 {
   // library directories
   cmTargetDependSet tds =
-    this->GetGlobalGenerator()->GetTargetDirectDepends(*this->Target);
+    this->GetGlobalGenerator()->GetTargetDirectDepends(this->GeneratorTarget);
   for (cmTargetDependSet::iterator tdsI = tds.begin(); tdsI != tds.end();
        ++tdsI)
     {
-    const cmTarget *tg(*tdsI);
+    const cmTarget *tg = (*tdsI)->Target;
     *this->GetFolderBuildStreams() << "    -L\"" << GetAbsBuildFilePath(tg)
                                    << "\"" << std::endl;
     }
@@ -373,7 +374,8 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries()
     cmTarget *tg(GetGlobalGenerator()->FindTarget(libName));
     if (NULL != tg)
       {
-      cmGhsMultiTargetGenerator gmtg(tg);
+      cmGeneratorTarget* gt = GetGlobalGenerator()->GetGeneratorTarget(tg);
+      cmGhsMultiTargetGenerator gmtg(gt);
       libName = tg->GetName() + ".a";
       }
     *this->GetFolderBuildStreams() << "    -l\"" << libName << "\""
diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h
index 8e81db8..c29a31e 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();
 
@@ -100,6 +100,7 @@ private:
                                   const std::string &language);
 
   cmTarget *Target;
+  cmGeneratorTarget* GeneratorTarget;
   cmLocalGhsMultiGenerator *LocalGenerator;
   cmMakefile *Makefile;
   std::string AbsBuildFilePath;
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=5d1e88d7ac9fa35481b6acb9a2523c364dfd476c
commit 5d1e88d7ac9fa35481b6acb9a2523c364dfd476c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 12:59:25 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:14:59 2015 +0200

    cmGeneratorTarget: Add accessor for cmLocalGenerator.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 2f68ab0..482eefd 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=dbcb4464ac665b238087eeecd634d7ab51913713
commit dbcb4464ac665b238087eeecd634d7ab51913713
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 13:00:51 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 21:14:59 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);
 
 };

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

Summary of changes:
 Source/cmExtraCodeBlocksGenerator.cxx          |   24 +++++++++++++-----------
 Source/cmExtraCodeBlocksGenerator.h            |    5 +++--
 Source/cmGeneratorTarget.cxx                   |   10 ++++++++--
 Source/cmGeneratorTarget.h                     |    4 +++-
 Source/cmGhsMultiTargetGenerator.cxx           |   24 +++++++++++++-----------
 Source/cmGhsMultiTargetGenerator.h             |    3 ++-
 Source/cmGlobalGenerator.cxx                   |    9 +++++----
 Source/cmGlobalGenerator.h                     |    2 +-
 Source/cmLocalGhsMultiGenerator.cxx            |    2 +-
 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/cmQtAutoGenerators.cxx                  |    6 +++---
 Source/cmVisualStudio10TargetGenerator.cxx     |    2 +-
 Source/cmake.cxx                               |    2 +-
 22 files changed, 74 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list