[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-325-gc9c13c2

Stephen Kelly steveire at gmail.com
Sat Oct 10 05:41:59 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  c9c13c26f36a68e0c9d6d7a35055bc156ef6aea9 (commit)
       via  504c6d2032789926536ee97dd545894f65f8b5e1 (commit)
       via  ee3121be4a4cfe438b9da84d4b3c00f770c0d581 (commit)
       via  ae2f757aaecc6deff840af565d720a3e11b6dc53 (commit)
       via  775da7a32ea2b57eaa6efaba736c3ba7ded23e67 (commit)
       via  a70de679ed964f97422f3ffb065c8b91726e2260 (commit)
       via  05fb83041999c351a10782d5030cbd95c20f5e65 (commit)
       via  e21544ecd34b08f9a181e61ff915571a50398d1b (commit)
       via  1c8375317e5aaab268c0aaca0f196a134698e090 (commit)
       via  c5549817d395f89efc1238b67b300b3f102b3a18 (commit)
       via  895d210831c0b70c5aa7d731940d87d3f5762beb (commit)
       via  e345d1bebac961f9942cb5f9a576b7fd8e3b56ff (commit)
       via  053dd97933e57a1107e606c19f92784d84691031 (commit)
       via  95a780becd6f20994c59b9dd8de7c6f91d8a638d (commit)
       via  1e769f360f22d0fdc09e049bcd3f3f6005534aa4 (commit)
      from  447886f9173e168eaacd9aacc01c8fc82a763cb3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9c13c26f36a68e0c9d6d7a35055bc156ef6aea9
commit c9c13c26f36a68e0c9d6d7a35055bc156ef6aea9
Merge: 447886f 504c6d2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 05:41:57 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 10 05:41:57 2015 -0400

    Merge topic 'use-generator-target' into next
    
    504c6d20 Sublime: Port some API to cmGeneratorTarget.
    ee3121be cmGeneratorTarget: Port processILibs to cmGeneratorTarget.
    ae2f757a cmGeneratorTarget: Port getTypedProperty to cmGeneratorTarget.
    775da7a3 cmGeneratorTarget: Port handleSystemIncludesDep to cmGeneratorTarget.
    a70de679 cmGeneratorTarget: Port LinkImplClosure to cmGeneratorTarget.
    05fb8304 cmCommonTargetGenerator: Port implementation detail to cmGeneratorTarget.
    e21544ec cmComputeLinkDepends: Port implementation detail to cmGeneratorTarget.
    1c837531 cmLinkItem: Port to cmGeneratorTarget.
    c5549817 cmHeadToLinkInterfaceMap: Port to cmGeneratorTarget.
    895d2108 cmGeneratorTarget: Move GetUtilityItems from cmTarget.
    e345d1be cmComputeLinkDepends: Port result API to cmGeneratorTarget.
    053dd979 cmComputeLinkInformation: Port result API to cmGeneratorTarget.
    95a780be cmComputeLinkInformation: Port data interface to cmGeneratorTarget.
    1e769f36 cmComputeLinkInformation: Port some implementation to cmGeneratorTarget.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=504c6d2032789926536ee97dd545894f65f8b5e1
commit 504c6d2032789926536ee97dd545894f65f8b5e1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 9 22:04:51 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:41:04 2015 +0200

    Sublime: Port some API to cmGeneratorTarget.

diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 11410a7..21c71b0 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -255,9 +255,9 @@ void cmExtraSublimeTextGenerator::
             }
           std::vector<std::string>& flags = sourceFileFlagsIter->second;
           std::string flagsString =
-            this->ComputeFlagsForObject(*iter, lg, target, gtgt);
+            this->ComputeFlagsForObject(*iter, lg, gtgt);
           std::string definesString =
-            this->ComputeDefines(*iter, lg, target, gtgt);
+            this->ComputeDefines(*iter, lg, gtgt);
           flags.clear();
           cmsys::RegularExpression flagRegex;
           // Regular expression to extract compiler flags from a string
@@ -365,7 +365,6 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand(
 std::string
 cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source,
                                                    cmLocalGenerator* lg,
-                                                   cmTarget *target,
                                                    cmGeneratorTarget* gtgt)
 {
   std::string flags;
@@ -390,7 +389,7 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source,
   //   }
 
   // Add shared-library flags if needed.
-  lg->AddCMP0018Flags(flags, target, language, config);
+  lg->AddCMP0018Flags(flags, gtgt->Target, language, config);
 
   // Add include directory flags.
   {
@@ -405,7 +404,7 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source,
   lg->AppendFlags(flags, makefile->GetDefineFlags());
 
   // Add target-specific flags.
-  lg->AddCompileOptions(flags, target, language, config);
+  lg->AddCompileOptions(flags, gtgt->Target, language, config);
 
   // Add source file specific flags.
   lg->AppendFlags(flags, source->GetProperty("COMPILE_FLAGS"));
@@ -419,8 +418,8 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source,
 // void cmMakefileTargetGenerator::WriteTargetLanguageFlags().
 std::string
 cmExtraSublimeTextGenerator::
-ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target,
-               cmGeneratorTarget*)
+ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg,
+               cmGeneratorTarget* target)
 
 {
   std::set<std::string> defines;
@@ -429,13 +428,13 @@ ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target,
   const std::string& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
 
   // Add the export symbol definition for shared library objects.
-  if(const char* exportMacro = target->GetExportMacro())
+  if(const char* exportMacro = target->Target->GetExportMacro())
     {
     lg->AppendDefines(defines, exportMacro);
     }
 
   // Add preprocessor definitions for this target and configuration.
-  lg->AddCompileDefinitions(defines, target, config, language);
+  lg->AddCompileDefinitions(defines, target->Target, config, language);
   lg->AppendDefines(defines, source->GetProperty("COMPILE_DEFINITIONS"));
   {
   std::string defPropName = "COMPILE_DEFINITIONS_";
diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h
index 4173b7d..5dd1140 100644
--- a/Source/cmExtraSublimeTextGenerator.h
+++ b/Source/cmExtraSublimeTextGenerator.h
@@ -79,11 +79,10 @@ private:
    */
   std::string ComputeFlagsForObject(cmSourceFile *source,
                                     cmLocalGenerator* lg,
-                                    cmTarget *target,
                                     cmGeneratorTarget* gtgt);
 
   std::string ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg,
-                             cmTarget *target, cmGeneratorTarget* gtgt);
+                             cmGeneratorTarget* gtgt);
 };
 
 #endif

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee3121be4a4cfe438b9da84d4b3c00f770c0d581
commit ee3121be4a4cfe438b9da84d4b3c00f770c0d581
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:47:37 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:41:04 2015 +0200

    cmGeneratorTarget: Port processILibs to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 45366e9..9eef514 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2067,9 +2067,9 @@ void processILibs(const std::string& config,
                   cmLinkItem const& item,
                   cmGlobalGenerator* gg,
                   std::vector<cmGeneratorTarget const*>& tgts,
-                  std::set<cmTarget const*>& emitted)
+                  std::set<cmGeneratorTarget const*>& emitted)
 {
-  if (item.Target && emitted.insert(item.Target->Target).second)
+  if (item.Target && emitted.insert(item.Target).second)
     {
     tgts.push_back(item.Target);
     if(cmLinkInterfaceLibraries const* iface =
@@ -2095,7 +2095,7 @@ cmGeneratorTarget::GetLinkImplementationClosure(
   if(!tgts.Done)
     {
     tgts.Done = true;
-    std::set<cmTarget const*> emitted;
+    std::set<cmGeneratorTarget const*> emitted;
 
     cmLinkImplementationLibraries const* impl
       = this->GetLinkImplementationLibraries(config);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae2f757aaecc6deff840af565d720a3e11b6dc53
commit ae2f757aaecc6deff840af565d720a3e11b6dc53
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:47:02 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:41:04 2015 +0200

    cmGeneratorTarget: Port getTypedProperty to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 46eed61..45366e9 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3979,18 +3979,20 @@ std::string compatibilityAgree(CompatibleType t, bool dominant)
 
 //----------------------------------------------------------------------------
 template<typename PropertyType>
-PropertyType getTypedProperty(cmTarget const* tgt, const std::string& prop);
+PropertyType getTypedProperty(cmGeneratorTarget const* tgt,
+                              const std::string& prop);
 
 //----------------------------------------------------------------------------
 template<>
-bool getTypedProperty<bool>(cmTarget const* tgt, const std::string& prop)
+bool getTypedProperty<bool>(cmGeneratorTarget const* tgt,
+                            const std::string& prop)
 {
   return tgt->GetPropertyAsBool(prop);
 }
 
 //----------------------------------------------------------------------------
 template<>
-const char *getTypedProperty<const char *>(cmTarget const* tgt,
+const char *getTypedProperty<const char *>(cmGeneratorTarget const* tgt,
                                            const std::string& prop)
 {
   return tgt->GetProperty(prop);
@@ -4120,7 +4122,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
                                           CompatibleType t,
                                           PropertyType *)
 {
-  PropertyType propContent = getTypedProperty<PropertyType>(tgt->Target, p);
+  PropertyType propContent = getTypedProperty<PropertyType>(tgt, p);
   const bool explicitlySet = tgt->Target->GetProperties()
                                   .find(p)
                                   != tgt->Target->GetProperties().end();
@@ -4172,7 +4174,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
                             .find(interfaceProperty)
                             != theTarget->Target->GetProperties().end();
     PropertyType ifacePropContent =
-                    getTypedProperty<PropertyType>(theTarget->Target,
+                    getTypedProperty<PropertyType>(theTarget,
                               interfaceProperty);
 
     std::string reportEntry;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=775da7a32ea2b57eaa6efaba736c3ba7ded23e67
commit 775da7a32ea2b57eaa6efaba736c3ba7ded23e67
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 11:40:50 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:40:50 2015 +0200

    cmGeneratorTarget: Port handleSystemIncludesDep to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 23b09ea..46eed61 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -510,7 +510,8 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile const* sf) const
   return 0;
 }
 
-static void handleSystemIncludesDep(cmMakefile *mf, cmTarget const* depTgt,
+static void handleSystemIncludesDep(cmMakefile *mf,
+                                  cmGeneratorTarget const* depTgt,
                                   const std::string& config,
                                   cmGeneratorTarget const* headTarget,
                                   cmGeneratorExpressionDAGChecker *dagChecker,
@@ -524,7 +525,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget const* depTgt,
     cmSystemTools::ExpandListArgument(ge.Parse(dirs)
                                       ->Evaluate(mf,
                                       config, false, headTarget->Target,
-                                      depTgt, dagChecker), result);
+                                      depTgt->Target, dagChecker), result);
     }
   if (!depTgt->IsImported() || excludeImported)
     {
@@ -538,7 +539,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget const* depTgt,
     cmSystemTools::ExpandListArgument(ge.Parse(dirs)
                                       ->Evaluate(mf,
                                       config, false, headTarget->Target,
-                                      depTgt, dagChecker), result);
+                                      depTgt->Target, dagChecker), result);
     }
 }
 
@@ -887,7 +888,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
     for(std::vector<cmGeneratorTarget const*>::const_iterator
           li = deps.begin(), le = deps.end(); li != le; ++li)
       {
-      handleSystemIncludesDep(this->Makefile, (*li)->Target, config, this,
+      handleSystemIncludesDep(this->Makefile, *li, config, this,
                               &dagChecker, result, excludeImported);
       }
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a70de679ed964f97422f3ffb065c8b91726e2260
commit a70de679ed964f97422f3ffb065c8b91726e2260
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:45:44 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:39:14 2015 +0200

    cmGeneratorTarget: Port LinkImplClosure to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 948b42b..23b09ea 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -882,12 +882,12 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
                                           &dagChecker), result);
       }
 
-    std::vector<cmTarget const*> const& deps =
+    std::vector<cmGeneratorTarget const*> const& deps =
       this->GetLinkImplementationClosure(config);
-    for(std::vector<cmTarget const*>::const_iterator
+    for(std::vector<cmGeneratorTarget const*>::const_iterator
           li = deps.begin(), le = deps.end(); li != le; ++li)
       {
-      handleSystemIncludesDep(this->Makefile, *li, config, this,
+      handleSystemIncludesDep(this->Makefile, (*li)->Target, config, this,
                               &dagChecker, result, excludeImported);
       }
 
@@ -2065,12 +2065,12 @@ void processILibs(const std::string& config,
                   cmGeneratorTarget const* headTarget,
                   cmLinkItem const& item,
                   cmGlobalGenerator* gg,
-                  std::vector<cmTarget const*>& tgts,
+                  std::vector<cmGeneratorTarget const*>& tgts,
                   std::set<cmTarget const*>& emitted)
 {
   if (item.Target && emitted.insert(item.Target->Target).second)
     {
-    tgts.push_back(item.Target->Target);
+    tgts.push_back(item.Target);
     if(cmLinkInterfaceLibraries const* iface =
        item.Target->GetLinkInterfaceLibraries(config, headTarget, true))
       {
@@ -2085,7 +2085,7 @@ void processILibs(const std::string& config,
 }
 
 //----------------------------------------------------------------------------
-const std::vector<const cmTarget*>&
+const std::vector<const cmGeneratorTarget*>&
 cmGeneratorTarget::GetLinkImplementationClosure(
     const std::string& config) const
 {
@@ -3629,10 +3629,10 @@ cmGeneratorTarget::GetCompatibleInterfaces(std::string const& config) const
     compat.Done = true;
     compat.PropsBool.insert("POSITION_INDEPENDENT_CODE");
     compat.PropsString.insert("AUTOUIC_OPTIONS");
-    std::vector<cmTarget const*> const& deps =
+    std::vector<cmGeneratorTarget const*> const& deps =
       this->GetLinkImplementationClosure(config);
-    for(std::vector<cmTarget const*>::const_iterator li = deps.begin();
-        li != deps.end(); ++li)
+    for(std::vector<cmGeneratorTarget const*>::const_iterator li =
+        deps.begin(); li != deps.end(); ++li)
       {
 #define CM_READ_COMPATIBLE_INTERFACE(X, x) \
       if(const char* prop = (*li)->GetProperty("COMPATIBLE_INTERFACE_" #X)) \
@@ -4128,7 +4128,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
   assert((impliedByUse ^ explicitlySet)
       || (!impliedByUse && !explicitlySet));
 
-  std::vector<cmTarget const*> const& deps =
+  std::vector<cmGeneratorTarget const*> const& deps =
     tgt->GetLinkImplementationClosure(config);
 
   if(deps.empty())
@@ -4155,7 +4155,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
     }
 
   std::string interfaceProperty = "INTERFACE_" + p;
-  for(std::vector<cmTarget const*>::const_iterator li =
+  for(std::vector<cmGeneratorTarget const*>::const_iterator li =
       deps.begin();
       li != deps.end(); ++li)
     {
@@ -4165,13 +4165,13 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
     // target itself has a POSITION_INDEPENDENT_CODE which disagrees
     // with a dependency.
 
-    cmTarget const* theTarget = *li;
+    cmGeneratorTarget const* theTarget = *li;
 
-    const bool ifaceIsSet = theTarget->GetProperties()
+    const bool ifaceIsSet = theTarget->Target->GetProperties()
                             .find(interfaceProperty)
-                            != theTarget->GetProperties().end();
+                            != theTarget->Target->GetProperties().end();
     PropertyType ifacePropContent =
-                    getTypedProperty<PropertyType>(theTarget,
+                    getTypedProperty<PropertyType>(theTarget->Target,
                               interfaceProperty);
 
     std::string reportEntry;
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 70612f2..a278b53 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -475,7 +475,7 @@ private:
   cmGeneratorTarget(cmGeneratorTarget const&);
   void operator=(cmGeneratorTarget const&);
 
-  struct LinkImplClosure: public std::vector<cmTarget const*>
+  struct LinkImplClosure: public std::vector<cmGeneratorTarget const*>
   {
     LinkImplClosure(): Done(false) {}
     bool Done;
@@ -553,8 +553,8 @@ private:
                            std::string& out) const;
 
 public:
-  std::vector<cmTarget const*> const&
-    GetLinkImplementationClosure(const std::string& config) const;
+  const std::vector<const cmGeneratorTarget*>&
+  GetLinkImplementationClosure(const std::string& config) const;
 
   mutable std::map<std::string, std::string> MaxLanguageStandards;
   std::map<std::string, std::string> const&

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05fb83041999c351a10782d5030cbd95c20f5e65
commit 05fb83041999c351a10782d5030cbd95c20f5e65
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:37:30 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:34:36 2015 +0200

    cmCommonTargetGenerator: Port implementation detail to cmGeneratorTarget.

diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index b9ed345..f901414 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -383,7 +383,7 @@ std::vector<std::string>
 cmCommonTargetGenerator::GetLinkedTargetDirectories() const
 {
   std::vector<std::string> dirs;
-  std::set<cmTarget const*> emitted;
+  std::set<cmGeneratorTarget const*> emitted;
   if (cmComputeLinkInformation* cli =
       this->GeneratorTarget->GetLinkInformation(this->ConfigName))
     {
@@ -397,7 +397,7 @@ cmCommonTargetGenerator::GetLinkedTargetDirectories() const
                 // Target->GetLinkInformation already processed their
                 // link interface and they don't have any output themselves.
                 && linkee->GetType() != cmTarget::INTERFACE_LIBRARY
-                && emitted.insert(linkee->Target).second)
+                && emitted.insert(linkee).second)
         {
         cmLocalGenerator* lg = linkee->GetLocalGenerator();
         cmMakefile* mf = linkee->Target->GetMakefile();

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e21544ecd34b08f9a181e61ff915571a50398d1b
commit e21544ecd34b08f9a181e61ff915571a50398d1b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:21:48 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:34:36 2015 +0200

    cmComputeLinkDepends: Port implementation detail to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index f82cb41..66e4c4b 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -526,9 +526,8 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
           }
         }
 
-      cmGeneratorTarget* gtgt =
-          this->GlobalGenerator->GetGeneratorTarget(
-            this->FindTargetToLink(depender_index, *di));
+      const cmGeneratorTarget* gtgt =
+          this->FindTargetToLink(depender_index, *di);
       // If the library is meant for this link type then use it.
       if(llt == cmTarget::GENERAL || llt == this->LinkType)
         {
@@ -634,8 +633,9 @@ cmComputeLinkDepends::AddLinkEntries(
 }
 
 //----------------------------------------------------------------------------
-cmTarget const* cmComputeLinkDepends::FindTargetToLink(int depender_index,
-                                                 const std::string& name)
+cmGeneratorTarget const*
+cmComputeLinkDepends::FindTargetToLink(int depender_index,
+                                       const std::string& name)
 {
   // Look for a target in the scope of the depender.
   cmGeneratorTarget const* from = this->Target;
@@ -647,7 +647,9 @@ cmTarget const* cmComputeLinkDepends::FindTargetToLink(int depender_index,
       from = depender;
       }
     }
-  return from->Target->FindTargetToLink(name);
+
+  return this->GlobalGenerator->GetGeneratorTarget(
+        from->Target->FindTargetToLink(name));
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index dba3948..9d960c6 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -75,8 +75,8 @@ private:
   void AddDirectLinkEntries();
   template <typename T>
     void AddLinkEntries(int depender_index, std::vector<T> const& libs);
-  cmTarget const* FindTargetToLink(int depender_index,
-                                   const std::string& name);
+  cmGeneratorTarget const* FindTargetToLink(int depender_index,
+                                            const std::string& name);
 
   // One entry for each unique item.
   std::vector<LinkEntry> EntryList;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c8375317e5aaab268c0aaca0f196a134698e090
commit 1c8375317e5aaab268c0aaca0f196a134698e090
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:18:42 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:34:27 2015 +0200

    cmLinkItem: Port to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 4d7b01e..f82cb41 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -320,8 +320,7 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item)
   int index = lei->second;
   LinkEntry& entry = this->EntryList[index];
   entry.Item = item;
-  entry.Target =
-      item.Target ? this->GlobalGenerator->GetGeneratorTarget(item.Target) : 0;
+  entry.Target = item.Target;
   entry.IsFlag = (!entry.Target && item[0] == '-' && item[1] != 'l' &&
                   item.substr(0, 10) != "-framework");
 
@@ -443,9 +442,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
     // Initialize the item entry.
     LinkEntry& entry = this->EntryList[lei->second];
     entry.Item = dep.Item;
-    entry.Target =
-        dep.Item.Target ?
-          this->GlobalGenerator->GetGeneratorTarget(dep.Item.Target) : 0;
+    entry.Target = dep.Item.Target;
 
     // This item was added specifically because it is a dependent
     // shared library.  It may get special treatment
@@ -529,15 +526,18 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
           }
         }
 
+      cmGeneratorTarget* gtgt =
+          this->GlobalGenerator->GetGeneratorTarget(
+            this->FindTargetToLink(depender_index, *di));
       // If the library is meant for this link type then use it.
       if(llt == cmTarget::GENERAL || llt == this->LinkType)
         {
-        cmLinkItem item(*di, this->FindTargetToLink(depender_index, *di));
+        cmLinkItem item(*di, gtgt);
         actual_libs.push_back(item);
         }
       else if(this->OldLinkDirMode)
         {
-        cmLinkItem item(*di, this->FindTargetToLink(depender_index, *di));
+        cmLinkItem item(*di, gtgt);
         this->CheckWrongConfigItem(item);
         }
 
@@ -982,7 +982,6 @@ void cmComputeLinkDepends::CheckWrongConfigItem(cmLinkItem const& item)
   // directories.
   if(item.Target && !item.Target->IsImported())
     {
-    this->OldWrongConfigItems.insert(
-            this->GlobalGenerator->GetGeneratorTarget(item.Target));
+    this->OldWrongConfigItems.insert(item.Target);
     }
 }
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index e53b7b9..8f3def2 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -319,22 +319,20 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
                                              std::set<std::string> &emitted)
 {
   cmGeneratorTarget const* depender = this->Targets[depender_index];
-  cmTarget const* dependee = dependee_name.Target;
+  cmGeneratorTarget 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
   // within the project.
   if(dependee &&
      dependee->GetType() == cmTarget::EXECUTABLE &&
-     !dependee->IsExecutableWithExports())
+     !dependee->Target->IsExecutableWithExports())
     {
     dependee = 0;
     }
 
   if(dependee)
     {
-    cmGeneratorTarget* gt =
-        this->GlobalGenerator->GetGeneratorTarget(dependee);
-    this->AddInterfaceDepends(depender_index, gt, "", emitted);
+    this->AddInterfaceDepends(depender_index, dependee, "", emitted);
     std::vector<std::string> configs;
     depender->Makefile->GetConfigurations(configs);
     for (std::vector<std::string>::const_iterator it = configs.begin();
@@ -342,7 +340,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
       {
       // A target should not depend on itself.
       emitted.insert(depender->GetName());
-      this->AddInterfaceDepends(depender_index, gt, *it, emitted);
+      this->AddInterfaceDepends(depender_index, dependee, *it, emitted);
       }
     }
 }
@@ -356,7 +354,7 @@ void cmComputeTargetDepends::AddTargetDepend(
   cmGeneratorTarget const* depender = this->Targets[depender_index];
 
   // Check the target's makefile first.
-  cmTarget const* dependee = dependee_name.Target;
+  cmGeneratorTarget const* dependee = dependee_name.Target;
 
   if(!dependee && !linking &&
     (depender->GetType() != cmTarget::GLOBAL_TARGET))
@@ -403,16 +401,14 @@ void cmComputeTargetDepends::AddTargetDepend(
   // within the project.
   if(linking && dependee &&
      dependee->GetType() == cmTarget::EXECUTABLE &&
-     !dependee->IsExecutableWithExports())
+     !dependee->Target->IsExecutableWithExports())
     {
     dependee = 0;
     }
 
   if(dependee)
     {
-    cmGeneratorTarget* gt =
-        this->GlobalGenerator->GetGeneratorTarget(dependee);
-    this->AddTargetDepend(depender_index, gt, linking);
+    this->AddTargetDepend(depender_index, dependee, linking);
     }
 }
 
@@ -430,11 +426,9 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
     for(std::set<cmLinkItem>::const_iterator i = utils.begin();
         i != utils.end(); ++i)
       {
-      if(cmTarget const* transitive_dependee = i->Target)
+      if(cmGeneratorTarget const* transitive_dependee = i->Target)
         {
-        cmGeneratorTarget* gt =
-            this->GlobalGenerator->GetGeneratorTarget(transitive_dependee);
-        this->AddTargetDepend(depender_index, gt, false);
+        this->AddTargetDepend(depender_index, transitive_dependee, false);
         }
       }
     }
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 78a5b6f..7e47261 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -846,7 +846,7 @@ getLinkedTargetsContent(
     // Broken code can have a target in its own link interface.
     // Don't follow such link interface entries so as not to create a
     // self-referencing loop.
-    if (it->Target && it->Target != target)
+    if (it->Target && it->Target->Target != target)
       {
       depString +=
         sep + "$<TARGET_PROPERTY:" +
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index a5e35a1..948b42b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -773,8 +773,9 @@ std::set<cmLinkItem> const& cmGeneratorTarget::GetUtilityItems() const
     for(std::set<std::string>::const_iterator i = utilities.begin();
         i != utilities.end(); ++i)
       {
-      this->UtilityItems.insert(
-        cmLinkItem(*i, this->Makefile->FindTargetToUse(*i)));
+      cmGeneratorTarget* gt = this->GlobalGenerator
+          ->GetGeneratorTarget(this->Makefile->FindTargetToUse(*i));
+      this->UtilityItems.insert(cmLinkItem(*i, gt));
       }
     }
   return this->UtilityItems;
@@ -1728,15 +1729,12 @@ public:
         }
       return;
       }
-    if(!this->Visited.insert(item.Target).second)
+    if(!this->Visited.insert(item.Target->Target).second)
       {
       return;
       }
-    cmGeneratorTarget* gtgt =
-        this->Target->GetLocalGenerator()->GetGlobalGenerator()
-            ->GetGeneratorTarget(item.Target);
     cmLinkInterface const* iface =
-      gtgt->GetLinkInterface(this->Config, this->HeadTarget);
+      item.Target->GetLinkInterface(this->Config, this->HeadTarget);
     if(!iface) { return; }
 
     for(std::vector<std::string>::const_iterator
@@ -2070,12 +2068,11 @@ void processILibs(const std::string& config,
                   std::vector<cmTarget const*>& tgts,
                   std::set<cmTarget const*>& emitted)
 {
-  if (item.Target && emitted.insert(item.Target).second)
+  if (item.Target && emitted.insert(item.Target->Target).second)
     {
-    tgts.push_back(item.Target);
-    cmGeneratorTarget* gt = gg->GetGeneratorTarget(item.Target);
+    tgts.push_back(item.Target->Target);
     if(cmLinkInterfaceLibraries const* iface =
-       gt->GetLinkInterfaceLibraries(config, headTarget, true))
+       item.Target->GetLinkInterfaceLibraries(config, headTarget, true))
       {
       for(std::vector<cmLinkItem>::const_iterator
             it = iface->Libraries.begin();
@@ -4427,7 +4424,9 @@ void cmGeneratorTarget::LookupLinkItems(std::vector<std::string> const& names,
       {
       continue;
       }
-    items.push_back(cmLinkItem(name, this->Target->FindTargetToLink(name)));
+    cmGeneratorTarget* gt = this->GlobalGenerator
+        ->GetGeneratorTarget(this->Target->FindTargetToLink(name));
+    items.push_back(cmLinkItem(name, gt));
     }
 }
 
@@ -5397,9 +5396,10 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
         }
 
       // The entry is meant for this configuration.
+      cmTarget const* tgt = this->Target->FindTargetToLink(name);
+      cmGeneratorTarget* gt = this->GlobalGenerator->GetGeneratorTarget(tgt);
       impl.Libraries.push_back(
-        cmLinkImplItem(name, this->Target->FindTargetToLink(name),
-                       *btIt, evaluated != *le));
+        cmLinkImplItem(name, gt, *btIt, evaluated != *le));
       }
 
     std::set<std::string> const& seenProps = cge->GetSeenTargetProperties();
@@ -5428,9 +5428,10 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
         {
         continue;
         }
+      cmGeneratorTarget* gt = this->GlobalGenerator
+          ->GetGeneratorTarget(this->Target->FindTargetToLink(name));
       // Support OLD behavior for CMP0003.
-      impl.WrongConfigLibraries.push_back(
-        cmLinkItem(name, this->Target->FindTargetToLink(name)));
+      impl.WrongConfigLibraries.push_back(cmLinkItem(name, gt));
       }
     }
 }
diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h
index 33780a7..b875cc0 100644
--- a/Source/cmLinkItem.h
+++ b/Source/cmLinkItem.h
@@ -16,7 +16,6 @@
 #include "cmListFileCache.h"
 
 class cmGeneratorTarget;
-class cmTarget;
 
 // Basic information about each link item.
 class cmLinkItem: public std::string
@@ -25,9 +24,9 @@ class cmLinkItem: public std::string
 public:
   cmLinkItem(): std_string(), Target(0) {}
   cmLinkItem(const std_string& n,
-             cmTarget const* t): std_string(n), Target(t) {}
+             cmGeneratorTarget const* t): std_string(n), Target(t) {}
   cmLinkItem(cmLinkItem const& r): std_string(r), Target(r.Target) {}
-  cmTarget const* Target;
+  cmGeneratorTarget const* Target;
 };
 
 class cmLinkImplItem: public cmLinkItem
@@ -35,7 +34,7 @@ class cmLinkImplItem: public cmLinkItem
 public:
   cmLinkImplItem(): cmLinkItem(), Backtrace(), FromGenex(false) {}
   cmLinkImplItem(std::string const& n,
-                 cmTarget const* t,
+                 cmGeneratorTarget const* t,
                  cmListFileBacktrace const& bt,
                  bool fromGenex):
     cmLinkItem(n, t), Backtrace(bt), FromGenex(fromGenex) {}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5549817d395f89efc1238b67b300b3f102b3a18
commit c5549817d395f89efc1238b67b300b3f102b3a18
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:05:41 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:26:13 2015 +0200

    cmHeadToLinkInterfaceMap: Port to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c9fdb93..a5e35a1 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -4490,7 +4490,7 @@ cmGeneratorTarget::GetLinkInterface(const std::string& config,
     return &hm.begin()->second;
     }
 
-  cmOptionalLinkInterface& iface = hm[head->Target];
+  cmOptionalLinkInterface& iface = hm[head];
   if(!iface.LibrariesDone)
     {
     iface.LibrariesDone = true;
@@ -4642,7 +4642,7 @@ cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config,
     return &hm.begin()->second;
     }
 
-  cmOptionalLinkInterface& iface = hm[head->Target];
+  cmOptionalLinkInterface& iface = hm[head];
   if(!iface.LibrariesDone)
     {
     iface.LibrariesDone = true;
@@ -5079,7 +5079,7 @@ cmGeneratorTarget::GetImportLinkInterface(const std::string& config,
     return &hm.begin()->second;
     }
 
-  cmOptionalLinkInterface& iface = hm[headTarget->Target];
+  cmOptionalLinkInterface& iface = hm[headTarget];
   if(!iface.AllDone)
     {
     iface.AllDone = true;
diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h
index 10dd465..33780a7 100644
--- a/Source/cmLinkItem.h
+++ b/Source/cmLinkItem.h
@@ -15,6 +15,7 @@
 
 #include "cmListFileCache.h"
 
+class cmGeneratorTarget;
 class cmTarget;
 
 // Basic information about each link item.
@@ -97,7 +98,7 @@ struct cmOptionalLinkInterface: public cmLinkInterface
 };
 
 struct cmHeadToLinkInterfaceMap:
-    public std::map<cmTarget const*, cmOptionalLinkInterface>
+    public std::map<cmGeneratorTarget const*, cmOptionalLinkInterface>
 {
 };
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=895d210831c0b70c5aa7d731940d87d3f5762beb
commit 895d210831c0b70c5aa7d731940d87d3f5762beb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:01:38 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:26:07 2015 +0200

    cmGeneratorTarget: Move GetUtilityItems from cmTarget.

diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 8df6165..dba3948 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -14,6 +14,7 @@
 
 #include "cmStandardIncludes.h"
 #include "cmTarget.h"
+#include "cmLinkItem.h"
 
 #include "cmGraphAdjacencyList.h"
 
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 18aad10..e53b7b9 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -272,7 +272,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
 
   // Loop over all utility dependencies.
   {
-  std::set<cmLinkItem> const& tutils = depender->Target->GetUtilityItems();
+  std::set<cmLinkItem> const& tutils = depender->GetUtilityItems();
   std::set<std::string> emitted;
   // A target should not depend on itself.
   emitted.insert(depender->GetName());
@@ -426,7 +426,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
     {
     // Skip IMPORTED and INTERFACE targets but follow their utility
     // dependencies.
-    std::set<cmLinkItem> const& utils = dependee->Target->GetUtilityItems();
+    std::set<cmLinkItem> const& utils = dependee->GetUtilityItems();
     for(std::set<cmLinkItem>::const_iterator i = utils.begin();
         i != utils.end(); ++i)
       {
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c4fc1dd..c9fdb93 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -271,7 +271,8 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
   DebugCompileFeaturesDone(false),
   DebugCompileDefinitionsDone(false),
   DebugSourcesDone(false),
-  LinkImplementationLanguageIsContextDependent(true)
+  LinkImplementationLanguageIsContextDependent(true),
+  UtilityItemsDone(false)
 {
   this->Makefile = this->Target->GetMakefile();
   this->LocalGenerator = lg;
@@ -760,7 +761,23 @@ cmGeneratorTarget::GetExpectedXamlSources(std::set<std::string>& srcs,
 {
   XamlData data;
   IMPLEMENT_VISIT_IMPL(Xaml, COMMA cmGeneratorTarget::XamlData)
-  srcs = data.ExpectedXamlSources;
+      srcs = data.ExpectedXamlSources;
+}
+
+std::set<cmLinkItem> const& cmGeneratorTarget::GetUtilityItems() const
+{
+  if(!this->UtilityItemsDone)
+    {
+    this->UtilityItemsDone = true;
+    std::set<std::string> const& utilities = this->Target->GetUtilities();
+    for(std::set<std::string>::const_iterator i = utilities.begin();
+        i != utilities.end(); ++i)
+      {
+      this->UtilityItems.insert(
+        cmLinkItem(*i, this->Makefile->FindTargetToUse(*i)));
+      }
+    }
+  return this->UtilityItems;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 799110c..70612f2 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -82,6 +82,8 @@ public:
   void GetExpectedXamlSources(std::set<std::string>&,
                               const std::string& config) const;
 
+  std::set<cmLinkItem>const& GetUtilityItems() const;
+
   void ComputeObjectMapping();
 
   const char* GetFeature(const std::string& feature,
@@ -537,6 +539,7 @@ private:
   typedef std::pair<std::string, bool> OutputNameKey;
   typedef std::map<OutputNameKey, std::string> OutputNameMapType;
   mutable OutputNameMapType OutputNameMap;
+  mutable std::set<cmLinkItem> UtilityItems;
   mutable bool PolicyWarnedCMP0022;
   mutable bool DebugIncludesDone;
   mutable bool DebugCompileOptionsDone;
@@ -544,6 +547,7 @@ private:
   mutable bool DebugCompileDefinitionsDone;
   mutable bool DebugSourcesDone;
   mutable bool LinkImplementationLanguageIsContextDependent;
+  mutable bool UtilityItemsDone;
 
   bool ComputePDBOutputDir(const std::string& kind, const std::string& config,
                            std::string& out) const;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3de7efe..31a9aa7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -67,12 +67,10 @@ public:
   cmTargetInternals()
     : Backtrace()
     {
-    this->UtilityItemsDone = false;
     }
   cmTargetInternals(cmTargetInternals const&)
     : Backtrace()
     {
-    this->UtilityItemsDone = false;
     }
   ~cmTargetInternals();
 
@@ -82,9 +80,6 @@ public:
   typedef std::map<std::string, cmTarget::ImportInfo> ImportInfoMapType;
   ImportInfoMapType ImportInfoMap;
 
-  std::set<cmLinkItem> UtilityItems;
-  bool UtilityItemsDone;
-
   std::vector<std::string> IncludeDirectoriesEntries;
   std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces;
   std::vector<std::string> CompileOptionsEntries;
@@ -364,22 +359,6 @@ cmListFileBacktrace const* cmTarget::GetUtilityBacktrace(
 }
 
 //----------------------------------------------------------------------------
-std::set<cmLinkItem> const& cmTarget::GetUtilityItems() const
-{
-  if(!this->Internal->UtilityItemsDone)
-    {
-    this->Internal->UtilityItemsDone = true;
-    for(std::set<std::string>::const_iterator i = this->Utilities.begin();
-        i != this->Utilities.end(); ++i)
-      {
-      this->Internal->UtilityItems.insert(
-        cmLinkItem(*i, this->Makefile->FindTargetToUse(*i)));
-      }
-    }
-  return this->Internal->UtilityItems;
-}
-
-//----------------------------------------------------------------------------
 void cmTarget::FinishConfigure()
 {
   // Erase any cached link information that might have been comptued
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 16d0121..0c1bbd2 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -16,7 +16,6 @@
 #include "cmPropertyMap.h"
 #include "cmPolicies.h"
 #include "cmListFileCache.h"
-#include "cmLinkItem.h"
 
 #include <cmsys/auto_ptr.hxx>
 #if defined(CMAKE_BUILD_WITH_CMAKE)
@@ -206,7 +205,6 @@ public:
   void AddUtility(const std::string& u, cmMakefile *makefile = 0);
   ///! Get the utilities used by this target
   std::set<std::string>const& GetUtilities() const { return this->Utilities; }
-  std::set<cmLinkItem>const& GetUtilityItems() const;
   cmListFileBacktrace const* GetUtilityBacktrace(const std::string& u) const;
 
   /** Finalize the target at the end of the Configure step.  */

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e345d1bebac961f9942cb5f9a576b7fd8e3b56ff
commit e345d1bebac961f9942cb5f9a576b7fd8e3b56ff
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 00:54:18 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:25:58 2015 +0200

    cmComputeLinkDepends: Port result API to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 7d20827..4d7b01e 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -982,6 +982,7 @@ void cmComputeLinkDepends::CheckWrongConfigItem(cmLinkItem const& item)
   // directories.
   if(item.Target && !item.Target->IsImported())
     {
-    this->OldWrongConfigItems.insert(item.Target);
+    this->OldWrongConfigItems.insert(
+            this->GlobalGenerator->GetGeneratorTarget(item.Target));
     }
 }
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 5ad8714..8df6165 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -52,7 +52,7 @@ public:
   EntryVector const& Compute();
 
   void SetOldLinkDirMode(bool b);
-  std::set<cmTarget const*> const& GetOldWrongConfigItems() const
+  std::set<cmGeneratorTarget const*> const& GetOldWrongConfigItems() const
     { return this->OldWrongConfigItems; }
 
 private:
@@ -152,7 +152,7 @@ private:
 
   // Record of the original link line.
   std::vector<int> OriginalEntries;
-  std::set<cmTarget const*> OldWrongConfigItems;
+  std::set<cmGeneratorTarget const*> OldWrongConfigItems;
   void CheckWrongConfigItem(cmLinkItem const& item);
 
   int ComponentOrderId;
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 74ceead..c6225f6 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -19,7 +19,6 @@
 #include "cmState.h"
 #include "cmOutputConverter.h"
 #include "cmMakefile.h"
-#include "cmTarget.h"
 #include "cmGeneratorTarget.h"
 #include "cmake.h"
 #include "cmAlgorithms.h"
@@ -537,16 +536,16 @@ bool cmComputeLinkInformation::Compute()
     // For CMake 2.4 bug-compatibility we need to consider the output
     // directories of targets linked in another configuration as link
     // directories.
-    std::set<cmTarget const*> const& wrongItems = cld.GetOldWrongConfigItems();
-    for(std::set<cmTarget const*>::const_iterator i = wrongItems.begin();
-        i != wrongItems.end(); ++i)
+    std::set<cmGeneratorTarget const*> const& wrongItems =
+        cld.GetOldWrongConfigItems();
+    for(std::set<cmGeneratorTarget const*>::const_iterator i =
+        wrongItems.begin(); i != wrongItems.end(); ++i)
       {
-      cmTarget const* tgt = *i;
-      cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt);
+      cmGeneratorTarget const* tgt = *i;
       bool implib =
         (this->UseImportLibrary &&
          (tgt->GetType() == cmTarget::SHARED_LIBRARY));
-      std::string lib = gtgt->GetFullPath(this->Config , implib, true);
+      std::string lib = tgt->GetFullPath(this->Config , implib, true);
       this->OldLinkDirItems.push_back(lib);
       }
     }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=053dd97933e57a1107e606c19f92784d84691031
commit 053dd97933e57a1107e606c19f92784d84691031
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 00:51:05 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:25:40 2015 +0200

    cmComputeLinkInformation: Port result API to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index c409b37..74ceead 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -471,7 +471,7 @@ std::vector<std::string> const& cmComputeLinkInformation::GetFrameworkPaths()
 }
 
 //----------------------------------------------------------------------------
-std::set<cmTarget const*> const&
+const std::set<const cmGeneratorTarget*>&
 cmComputeLinkInformation::GetSharedLibrariesLinked()
 {
   return this->SharedLibrariesLinked;
@@ -1093,7 +1093,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
   // Keep track of shared library targets linked.
   if(target->GetType() == cmTarget::SHARED_LIBRARY)
     {
-    this->SharedLibrariesLinked.insert(target->Target);
+    this->SharedLibrariesLinked.insert(target);
     }
 
   // Handle case of an imported shared library with no soname.
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index 2aac1bc..5eecf7d 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -19,7 +19,6 @@
 class cmake;
 class cmGlobalGenerator;
 class cmMakefile;
-class cmTarget;
 class cmGeneratorTarget;
 class cmOrderDirectories;
 
@@ -57,7 +56,7 @@ public:
   void GetRPath(std::vector<std::string>& runtimeDirs, bool for_install);
   std::string GetRPathString(bool for_install);
   std::string GetChrpathString();
-  std::set<cmTarget const*> const& GetSharedLibrariesLinked();
+  std::set<cmGeneratorTarget const*> const& GetSharedLibrariesLinked();
 
   std::string const& GetRPathLinkFlag() const { return this->RPathLinkFlag; }
   std::string GetRPathLinkString();
@@ -71,7 +70,7 @@ private:
   std::vector<std::string> Depends;
   std::vector<std::string> FrameworkPaths;
   std::vector<std::string> RuntimeSearchPath;
-  std::set<cmTarget const*> SharedLibrariesLinked;
+  std::set<cmGeneratorTarget const*> SharedLibrariesLinked;
 
   // Context information.
   cmGeneratorTarget const* Target;
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 383ee00..8c50b36 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -563,12 +563,12 @@ cmInstallTargetGenerator
   std::map<std::string, std::string> install_name_remap;
   if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config))
     {
-    std::set<cmTarget const*> const& sharedLibs
+    std::set<cmGeneratorTarget const*> const& sharedLibs
                                             = cli->GetSharedLibrariesLinked();
-    for(std::set<cmTarget const*>::const_iterator j = sharedLibs.begin();
+    for(std::set<cmGeneratorTarget const*>::const_iterator j = sharedLibs.begin();
         j != sharedLibs.end(); ++j)
       {
-      cmTarget const* tgt = *j;
+      cmGeneratorTarget const* tgt = *j;
 
       // The install_name of an imported target does not change.
       if(tgt->IsImported())
@@ -576,20 +576,17 @@ cmInstallTargetGenerator
         continue;
         }
 
-      cmGeneratorTarget *gtgt = tgt->GetMakefile()
-                                          ->GetGlobalGenerator()
-                                          ->GetGeneratorTarget(tgt);
       // If the build tree and install tree use different path
       // components of the install_name field then we need to create a
       // mapping to be applied after installation.
-      std::string for_build = gtgt->GetInstallNameDirForBuildTree(config);
-      std::string for_install = gtgt->GetInstallNameDirForInstallTree();
+      std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
+      std::string for_install = tgt->GetInstallNameDirForInstallTree();
       if(for_build != for_install)
         {
         // The directory portions differ.  Append the filename to
         // create the mapping.
         std::string fname =
-          this->GetInstallFilename(tgt, config, NameSO);
+          this->GetInstallFilename(tgt->Target, config, NameSO);
 
         // Map from the build-tree install_name.
         for_build += fname;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95a780becd6f20994c59b9dd8de7c6f91d8a638d
commit 95a780becd6f20994c59b9dd8de7c6f91d8a638d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 00:49:38 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:25:38 2015 +0200

    cmComputeLinkInformation: Port data interface to cmGeneratorTarget.

diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 252e231..b9ed345 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -391,21 +391,19 @@ cmCommonTargetGenerator::GetLinkedTargetDirectories() const
     for(cmComputeLinkInformation::ItemVector::const_iterator
           i = items.begin(); i != items.end(); ++i)
       {
-      cmTarget const* linkee = i->Target;
+      cmGeneratorTarget const* linkee = i->Target;
       if(linkee && !linkee->IsImported()
                 // We can ignore the INTERFACE_LIBRARY items because
                 // Target->GetLinkInformation already processed their
                 // link interface and they don't have any output themselves.
                 && linkee->GetType() != cmTarget::INTERFACE_LIBRARY
-                && emitted.insert(linkee).second)
+                && emitted.insert(linkee->Target).second)
         {
-        cmGeneratorTarget* gt =
-          this->GlobalGenerator->GetGeneratorTarget(linkee);
-        cmLocalGenerator* lg = gt->GetLocalGenerator();
-        cmMakefile* mf = linkee->GetMakefile();
+        cmLocalGenerator* lg = linkee->GetLocalGenerator();
+        cmMakefile* mf = linkee->Target->GetMakefile();
         std::string di = mf->GetCurrentBinaryDirectory();
         di += "/";
-        di += lg->GetTargetDirectory(*linkee);
+        di += lg->GetTargetDirectory(*linkee->Target);
         dirs.push_back(di);
         }
       }
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 58557c7..c409b37 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -658,7 +658,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
       std::string exe = tgt->GetFullPath(config, this->UseImportLibrary,
                                          true);
       linkItem += exe;
-      this->Items.push_back(Item(linkItem, true, tgt->Target));
+      this->Items.push_back(Item(linkItem, true, tgt));
       this->Depends.push_back(exe);
       }
     else if(tgt->GetType() == cmTarget::INTERFACE_LIBRARY)
@@ -666,7 +666,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
       // Add the interface library as an item so it can be considered as part
       // of COMPATIBLE_INTERFACE_ enforcement.  The generators will ignore
       // this for the actual link line.
-      this->Items.push_back(Item(std::string(), true, tgt->Target));
+      this->Items.push_back(Item(std::string(), true, tgt));
       }
     else
       {
@@ -1120,7 +1120,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
     }
 
   // Now add the full path to the library.
-  this->Items.push_back(Item(item, true, target->Target));
+  this->Items.push_back(Item(item, true, target));
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index 94c364d..2aac1bc 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -39,11 +39,11 @@ public:
     Item(): Value(), IsPath(true), Target(0) {}
     Item(Item const& item):
       Value(item.Value), IsPath(item.IsPath), Target(item.Target) {}
-    Item(std::string const& v, bool p, cmTarget const* target = 0):
+    Item(std::string const& v, bool p, cmGeneratorTarget const* target = 0):
       Value(v), IsPath(p), Target(target) {}
     std::string Value;
     bool IsPath;
-    cmTarget const* Target;
+    cmGeneratorTarget const* Target;
   };
   typedef std::vector<Item> ItemVector;
   ItemVector const& GetItems();
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index d6149b3..6669919 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -513,8 +513,9 @@ void cmExportFileGenerator::PopulateInterfaceProperty(
 
 
 //----------------------------------------------------------------------------
-void getPropertyContents(cmTarget const* tgt, const std::string& prop,
-         std::set<std::string> &ifaceProperties)
+void getPropertyContents(cmGeneratorTarget const* tgt,
+                         const std::string& prop,
+                         std::set<std::string> &ifaceProperties)
 {
   const char *p = tgt->GetProperty(prop);
   if (!p)
@@ -585,11 +586,11 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
 
   std::set<std::string> ifaceProperties;
 
-  getPropertyContents(target, "COMPATIBLE_INTERFACE_BOOL", ifaceProperties);
-  getPropertyContents(target, "COMPATIBLE_INTERFACE_STRING", ifaceProperties);
-  getPropertyContents(target, "COMPATIBLE_INTERFACE_NUMBER_MIN",
+  getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_BOOL", ifaceProperties);
+  getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_STRING", ifaceProperties);
+  getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_NUMBER_MIN",
                       ifaceProperties);
-  getPropertyContents(target, "COMPATIBLE_INTERFACE_NUMBER_MAX",
+  getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_NUMBER_MAX",
                       ifaceProperties);
 
   if (target->GetType() != cmTarget::INTERFACE_LIBRARY)
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f39a67d..c4fc1dd 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3735,7 +3735,7 @@ const char * getLinkInterfaceDependentProperty(cmGeneratorTarget const* tgt,
 //----------------------------------------------------------------------------
 template<typename PropertyType>
 void checkPropertyConsistency(cmGeneratorTarget const* depender,
-                              cmTarget const* dependee,
+                              cmGeneratorTarget const* dependee,
                               const std::string& propName,
                               std::set<std::string> &emitted,
                               const std::string& config,
@@ -3751,7 +3751,7 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender,
   std::vector<std::string> props;
   cmSystemTools::ExpandListArgument(prop, props);
   std::string pdir =
-    dependee->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT");
+    dependee->Target->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT");
   pdir += "/Help/prop_tgt/";
 
   for(std::vector<std::string>::iterator pi = props.begin();

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e769f360f22d0fdc09e049bcd3f3f6005534aa4
commit 1e769f360f22d0fdc09e049bcd3f3f6005534aa4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 00:45:02 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 11:25:16 2015 +0200

    cmComputeLinkInformation: Port some implementation to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 7e34611..58557c7 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -683,8 +683,8 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
         this->Depends.push_back(lib);
         }
 
-      this->AddTargetItem(lib, tgt->Target);
-      this->AddLibraryRuntimeInfo(lib, tgt->Target);
+      this->AddTargetItem(lib, tgt);
+      this->AddLibraryRuntimeInfo(lib, tgt);
       }
     }
   else
@@ -766,7 +766,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
   if(tgt)
     {
     lib = tgt->GetFullPath(this->Config, this->UseImportLibrary);
-    this->AddLibraryRuntimeInfo(lib, tgt->Target);
+    this->AddLibraryRuntimeInfo(lib, tgt);
     }
   else
     {
@@ -1077,7 +1077,7 @@ void cmComputeLinkInformation::SetCurrentLinkType(LinkType lt)
 
 //----------------------------------------------------------------------------
 void cmComputeLinkInformation::AddTargetItem(std::string const& item,
-                                             cmTarget const* target)
+                                             cmGeneratorTarget const* target)
 {
   // This is called to handle a link item that is a full path to a target.
   // If the target is not a static library make sure the link type is
@@ -1093,13 +1093,12 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
   // Keep track of shared library targets linked.
   if(target->GetType() == cmTarget::SHARED_LIBRARY)
     {
-    this->SharedLibrariesLinked.insert(target);
+    this->SharedLibrariesLinked.insert(target->Target);
     }
 
-  cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(target);
   // Handle case of an imported shared library with no soname.
   if(this->NoSONameUsesPath &&
-     gtgt->IsImportedSharedLibWithoutSOName(this->Config))
+     target->IsImportedSharedLibWithoutSOName(this->Config))
     {
     this->AddSharedLibNoSOName(item);
     return;
@@ -1113,7 +1112,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
 
   // For compatibility with CMake 2.4 include the item's directory in
   // the linker search path.
-  if(this->OldLinkDirMode && !target->IsFrameworkOnApple() &&
+  if(this->OldLinkDirMode && !target->Target->IsFrameworkOnApple() &&
      this->OldLinkDirMask.find(cmSystemTools::GetFilenamePath(item)) ==
      this->OldLinkDirMask.end())
     {
@@ -1121,7 +1120,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
     }
 
   // Now add the full path to the library.
-  this->Items.push_back(Item(item, true, target));
+  this->Items.push_back(Item(item, true, target->Target));
 }
 
 //----------------------------------------------------------------------------
@@ -1777,15 +1776,14 @@ cmComputeLinkInformation::GetRuntimeSearchPath()
 //----------------------------------------------------------------------------
 void
 cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath,
-                                                cmTarget const* target)
+                                              cmGeneratorTarget const* target)
 {
-  cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(target);
   // Ignore targets on Apple where install_name is not @rpath.
   // The dependenty library can be found with other means such as
   // @loader_path or full paths.
   if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
     {
-    if(!gtgt->HasMacOSXRpathInstallNameDir(this->Config))
+    if(!target->HasMacOSXRpathInstallNameDir(this->Config))
       {
       return;
       }
@@ -1807,7 +1805,7 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath,
 
   // Try to get the soname of the library.  Only files with this name
   // could possibly conflict.
-  std::string soName = gtgt->GetSOName(this->Config);
+  std::string soName = target->GetSOName(this->Config);
   const char* soname = soName.empty()? 0 : soName.c_str();
 
   // Include this library in the runtime path ordering.
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index b1e7e46..94c364d 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -129,7 +129,7 @@ private:
   std::string NoCaseExpression(const char* str);
 
   // Handling of link items.
-  void AddTargetItem(std::string const& item, cmTarget const* target);
+  void AddTargetItem(std::string const& item, const cmGeneratorTarget* target);
   void AddFullItem(std::string const& item);
   bool CheckImplicitDirItem(std::string const& item);
   void AddUserItem(std::string const& item, bool pathNotKnown);
@@ -183,7 +183,7 @@ private:
   bool CMP0060Warn;
 
   void AddLibraryRuntimeInfo(std::string const& fullPath,
-                             cmTarget const* target);
+                             const cmGeneratorTarget* target);
   void AddLibraryRuntimeInfo(std::string const& fullPath);
 
 };

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

Summary of changes:
 Source/cmCommonTargetGenerator.cxx     |   12 ++--
 Source/cmComputeLinkDepends.cxx        |   22 +++----
 Source/cmComputeLinkDepends.h          |    9 +--
 Source/cmComputeLinkInformation.cxx    |   39 ++++++------
 Source/cmComputeLinkInformation.h      |   13 ++--
 Source/cmComputeTargetDepends.cxx      |   28 ++++-----
 Source/cmExportFileGenerator.cxx       |   13 ++--
 Source/cmExtraSublimeTextGenerator.cxx |   17 +++---
 Source/cmExtraSublimeTextGenerator.h   |    3 +-
 Source/cmGeneratorExpressionNode.cxx   |    2 +-
 Source/cmGeneratorTarget.cxx           |  101 +++++++++++++++++++-------------
 Source/cmGeneratorTarget.h             |   10 +++-
 Source/cmInstallTargetGenerator.cxx    |   15 ++---
 Source/cmLinkItem.h                    |   10 ++--
 Source/cmTarget.cxx                    |   21 -------
 Source/cmTarget.h                      |    2 -
 16 files changed, 153 insertions(+), 164 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list