[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-376-g7a66c8b

Stephen Kelly steveire at gmail.com
Sat Oct 10 08:11:17 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  7a66c8bad451998b51a51f0fb79c6d65d44013ec (commit)
       via  8d3710471c2d5fa067b0a52dc2e2ce8b066c1d58 (commit)
       via  4216992604629a2ac69500e266cf7f095007f454 (commit)
       via  20102a723f381356ae4753c94584f662a9c22b4d (commit)
       via  bf14b121bb55241990f223579f0ba3f89c57a475 (commit)
       via  5e63ed9be398dafbfb05e55f9b64a602327db0aa (commit)
       via  4b382f3ee3bf7d915718150924fd358a026a72bb (commit)
       via  df8cb6efec82efa5610915bbadbda474368e46e0 (commit)
       via  bbd9b70dbc2f3277ad3b01c8b80ec8b5646814b8 (commit)
       via  61a3053faf69309828c9555795b8b9e6ed91558d (commit)
       via  dc1f9735fae5fac3884559b8e7b9ec9a51092b4a (commit)
       via  36724922064aba82080ffb53eacaa964c5a61d37 (commit)
       via  533ab6137307a2355db96c8ea73e6594ec13e81b (commit)
       via  edd2c4805d27824dae35f58fafaf883ade022a5b (commit)
       via  a44fda077251b9241a6ffa782ada1ea78cce7bac (commit)
       via  2f8e39bac198cb04fe872fed0bf3b471bb7edb4e (commit)
       via  64694951477c4fd0f976eb90f4328886798790dd (commit)
       via  05bd28bf6b77c99146a3088e347dc9471502c777 (commit)
       via  4c742b92b4e8088f1663bc55a0f2862ca69123e9 (commit)
       via  d7d27d58401ca7249cd54991f6ffa97df6524acc (commit)
       via  5ddc5120c65adf066ff6f074515e9f57b4ee6b45 (commit)
      from  387d6e90014384090c9fb7526ecb8af28f89c932 (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=7a66c8bad451998b51a51f0fb79c6d65d44013ec
commit 7a66c8bad451998b51a51f0fb79c6d65d44013ec
Merge: 387d6e9 8d37104
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 08:11:15 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 10 08:11:15 2015 -0400

    Merge topic 'use-generator-target' into next
    
    8d371047 cmTarget: Move ImportInfoMap out of internal class.
    42169926 cmTarget: Move backtrace member out of internal class.
    20102a72 cmTarget: Remove unneeded constructors.
    bf14b121 cmCommonTargetGenerator: Use GeneratorTarget more.
    5e63ed9b Genex: Port implementation detail to cmGeneratorTarget.
    4b382f3e cmGeneratorTarget: Move GetSupportDirectory from cmTarget.
    df8cb6ef cmGeneratorTarget: Move HasImportLibrary from cmTarget.
    bbd9b70d cmGeneratorTarget: Move HasImplibGNUtoMS from cmTarget.
    61a3053f Sublime: Port some API to cmGeneratorTarget.
    dc1f9735 cmGeneratorTarget: Port processILibs to cmGeneratorTarget.
    36724922 cmGeneratorTarget: Port getTypedProperty to cmGeneratorTarget.
    533ab613 cmGeneratorTarget: Port handleSystemIncludesDep to cmGeneratorTarget.
    edd2c480 cmGeneratorTarget: Port LinkImplClosure to cmGeneratorTarget.
    a44fda07 cmCommonTargetGenerator: Port implementation detail to cmGeneratorTarget.
    2f8e39ba cmLinkItem: Port to cmGeneratorTarget.
    64694951 cmGeneratorTarget: Move FindTargetToLink from cmTarget.
    ...


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d3710471c2d5fa067b0a52dc2e2ce8b066c1d58
commit 8d3710471c2d5fa067b0a52dc2e2ce8b066c1d58
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 9 23:15:40 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:50 2015 +0200

    cmTarget: Move ImportInfoMap out of internal class.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 369e497..847a5c1 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -64,9 +64,6 @@ const char* cmTarget::GetTargetTypeName(TargetType targetType)
 class cmTargetInternals
 {
 public:
-  typedef std::map<std::string, cmTarget::ImportInfo> ImportInfoMapType;
-  ImportInfoMapType ImportInfoMap;
-
   std::vector<std::string> IncludeDirectoriesEntries;
   std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces;
   std::vector<std::string> CompileOptionsEntries;
@@ -1538,7 +1535,7 @@ void cmTarget::MaybeInvalidatePropertyCache(const std::string& prop)
   // Wipe out maps caching information affected by this property.
   if(this->IsImported() && cmHasLiteralPrefix(prop, "IMPORTED"))
     {
-    this->Internal->ImportInfoMap.clear();
+    this->ImportInfoMap.clear();
     }
 }
 
@@ -2288,16 +2285,15 @@ cmTarget::GetImportInfo(const std::string& config) const
     {
     config_upper = "NOCONFIG";
     }
-  typedef cmTargetInternals::ImportInfoMapType ImportInfoMapType;
 
   ImportInfoMapType::const_iterator i =
-    this->Internal->ImportInfoMap.find(config_upper);
-  if(i == this->Internal->ImportInfoMap.end())
+    this->ImportInfoMap.find(config_upper);
+  if(i == this->ImportInfoMap.end())
     {
     ImportInfo info;
     this->ComputeImportInfo(config_upper, info);
     ImportInfoMapType::value_type entry(config_upper, info);
-    i = this->Internal->ImportInfoMap.insert(entry).first;
+    i = this->ImportInfoMap.insert(entry).first;
     }
 
   if(this->GetType() == INTERFACE_LIBRARY)
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 03c4cbe..97515a7 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -449,6 +449,9 @@ private:
     std::string SharedDeps;
   };
 
+  typedef std::map<std::string, ImportInfo> ImportInfoMapType;
+  mutable ImportInfoMapType ImportInfoMap;
+
   ImportInfo const* GetImportInfo(const std::string& config) const;
   void ComputeImportInfo(std::string const& desired_config,
                          ImportInfo& info) const;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4216992604629a2ac69500e266cf7f095007f454
commit 4216992604629a2ac69500e266cf7f095007f454
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 13:20:09 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:50 2015 +0200

    cmTarget: Move backtrace member out of internal class.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index fd8ea3e..369e497 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -64,9 +64,6 @@ const char* cmTarget::GetTargetTypeName(TargetType targetType)
 class cmTargetInternals
 {
 public:
-  // The backtrace when the target was created.
-  cmListFileBacktrace Backtrace;
-
   typedef std::map<std::string, cmTarget::ImportInfo> ImportInfoMapType;
   ImportInfoMapType ImportInfoMap;
 
@@ -240,7 +237,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
     }
 
   // Save the backtrace of target construction.
-  this->Internal->Backtrace = this->Makefile->GetBacktrace();
+  this->Backtrace = this->Makefile->GetBacktrace();
 
   if (!this->IsImported())
     {
@@ -363,7 +360,7 @@ void cmTarget::FinishConfigure()
 //----------------------------------------------------------------------------
 cmListFileBacktrace const& cmTarget::GetBacktrace() const
 {
-  return this->Internal->Backtrace;
+  return this->Backtrace;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 01261ed..03c4cbe 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -471,6 +471,8 @@ private:
                             std::string const& suffix,
                             std::string const& name,
                             const char* version) const;
+
+  cmListFileBacktrace Backtrace;
 };
 
 #ifdef CMAKE_BUILD_WITH_CMAKE

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20102a723f381356ae4753c94584f662a9c22b4d
commit 20102a723f381356ae4753c94584f662a9c22b4d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 9 23:11:48 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:50 2015 +0200

    cmTarget: Remove unneeded constructors.
    
    The compiler generated ones are fine here.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b8beb5c..fd8ea3e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -64,16 +64,6 @@ const char* cmTarget::GetTargetTypeName(TargetType targetType)
 class cmTargetInternals
 {
 public:
-  cmTargetInternals()
-    : Backtrace()
-    {
-    }
-  cmTargetInternals(cmTargetInternals const&)
-    : Backtrace()
-    {
-    }
-  ~cmTargetInternals();
-
   // The backtrace when the target was created.
   cmListFileBacktrace Backtrace;
 
@@ -95,11 +85,6 @@ public:
 };
 
 //----------------------------------------------------------------------------
-cmTargetInternals::~cmTargetInternals()
-{
-}
-
-//----------------------------------------------------------------------------
 cmTarget::cmTarget()
 {
   this->Makefile = 0;

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

    cmCommonTargetGenerator: Use GeneratorTarget more.

diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index f901414..24d0e61 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -109,7 +109,7 @@ std::string cmCommonTargetGenerator::ComputeFortranModuleDirectory() const
 {
   std::string mod_dir;
   const char* target_mod_dir =
-    this->Target->GetProperty("Fortran_MODULE_DIRECTORY");
+    this->GeneratorTarget->GetProperty("Fortran_MODULE_DIRECTORY");
   const char* moddir_flag =
     this->Makefile->GetDefinition("CMAKE_Fortran_MODDIR_FLAG");
   if(target_mod_dir && moddir_flag)
@@ -214,7 +214,7 @@ cmCommonTargetGenerator
     this->LocalGenerator->GetFortranFormat(srcfmt);
   if(format == cmLocalGenerator::FortranFormatNone)
     {
-    const char* tgtfmt = this->Target->GetProperty("Fortran_FORMAT");
+    const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
     format = this->LocalGenerator->GetFortranFormat(tgtfmt);
     }
   const char* var = 0;
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 2d2de5f..76ef8cc 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -168,7 +168,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   if(linkLanguage.empty())
     {
     cmSystemTools::Error("Cannot determine link language for target \"",
-                         this->Target->GetName().c_str(), "\".");
+                         this->GeneratorTarget->GetName().c_str(), "\".");
     return;
     }
 
@@ -197,7 +197,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
                            this->ConfigName);
 
 
-  if(this->Target->GetPropertyAsBool("WIN32_EXECUTABLE"))
+  if(this->GeneratorTarget->GetPropertyAsBool("WIN32_EXECUTABLE"))
     {
     this->LocalGenerator->AppendFlags
       (linkFlags, this->Makefile->GetDefinition("CMAKE_CREATE_WIN32_EXE"));
@@ -226,11 +226,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
 
   // Add target-specific linker flags.
   this->LocalGenerator->AppendFlags
-    (linkFlags, this->Target->GetProperty("LINK_FLAGS"));
+    (linkFlags, this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (linkFlags, this->Target->GetProperty(linkFlagsConfig));
+    (linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
 
   this->AddModuleDefinitionFlag(linkFlags);
 
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 8b60a23..5e5eeab 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -26,7 +26,7 @@ cmMakefileLibraryTargetGenerator
   cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnDepends;
-  if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
+  if (this->GeneratorTarget->GetType() != cmTarget::INTERFACE_LIBRARY)
     {
     this->GeneratorTarget->GetLibraryNames(
       this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
@@ -62,7 +62,7 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
 
   // write the link rules
   // Write the rule for this target type.
-  switch(this->Target->GetType())
+  switch(this->GeneratorTarget->GetType())
     {
     case cmTarget::STATIC_LIBRARY:
       this->WriteStaticLibraryRules();
@@ -122,11 +122,11 @@ void cmMakefileLibraryTargetGenerator::WriteObjectLibraryRules()
 
   // Write the rule.
   this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
-                                      this->Target->GetName(),
+                                      this->GeneratorTarget->GetName(),
                                       depends, commands, true);
 
   // Write the main driver rule to build everything in this target.
-  this->WriteTargetDriverRule(this->Target->GetName(), false);
+  this->WriteTargetDriverRule(this->GeneratorTarget->GetName(), false);
 }
 
 //----------------------------------------------------------------------------
@@ -166,11 +166,11 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink)
 
   std::string extraFlags;
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty("LINK_FLAGS"));
+    (extraFlags, this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty(linkFlagsConfig));
+    (extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
 
   this->LocalGenerator->AddConfigVariableFlags
     (extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName);
@@ -190,11 +190,11 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink)
 
   std::string extraFlags;
   this->LocalGenerator->AppendFlags(extraFlags,
-                                    this->Target->GetProperty("LINK_FLAGS"));
+                           this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty(linkFlagsConfig));
+    (extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
   this->LocalGenerator->AddConfigVariableFlags
     (extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName);
   this->AddModuleDefinitionFlag(extraFlags);
@@ -213,11 +213,11 @@ void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink)
 
   std::string extraFlags;
   this->LocalGenerator->AppendFlags(extraFlags,
-                                    this->Target->GetProperty("LINK_FLAGS"));
+                             this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty(linkFlagsConfig));
+    (extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
   this->LocalGenerator->AddConfigVariableFlags
     (extraFlags, "CMAKE_MACOSX_FRAMEWORK_LINKER_FLAGS", this->ConfigName);
 
@@ -244,7 +244,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   if(linkLanguage.empty())
     {
     cmSystemTools::Error("Cannot determine link language for target \"",
-                         this->Target->GetName().c_str(), "\".");
+                         this->GeneratorTarget->GetName().c_str(), "\".");
     return;
     }
 
@@ -253,8 +253,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   this->LocalGenerator->AppendFlags(linkFlags, extraFlags);
 
   // Add OSX version flags, if any.
-  if(this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
-     this->Target->GetType() == cmTarget::MODULE_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY ||
+     this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY)
     {
     this->AppendOSXVerFlag(linkFlags, linkLanguage, "COMPATIBILITY", true);
     this->AppendOSXVerFlag(linkFlags, linkLanguage, "CURRENT", false);
@@ -351,7 +351,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
     // Add the link message.
     std::string buildEcho = "Linking ";
     buildEcho += linkLanguage;
-    switch(this->Target->GetType())
+    switch(this->GeneratorTarget->GetType())
       {
       case cmTarget::STATIC_LIBRARY:
         buildEcho += " static library ";
@@ -375,7 +375,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
     }
 
   const char* forbiddenFlagVar = 0;
-  switch(this->Target->GetType())
+  switch(this->GeneratorTarget->GetType())
     {
     case cmTarget::SHARED_LIBRARY:
       forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS";
@@ -441,7 +441,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   std::vector<std::string> commands1;
   // Add a command to remove any existing files for this library.
   // for static libs only
-  if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY)
     {
     this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
                                              *this->Target, "target");
@@ -497,7 +497,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   std::vector<std::string> archiveAppendCommands;
   std::vector<std::string> archiveFinishCommands;
   std::string::size_type archiveCommandLimit = std::string::npos;
-  if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY)
     {
     haveStaticLibraryRule =
       this->Makefile->GetDefinition(linkRuleVar)? true:false;
@@ -552,7 +552,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
 
   // Collect up flags to link in needed libraries.
   std::string linkLibs;
-  if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
+  if(this->GeneratorTarget->GetType() != cmTarget::STATIC_LIBRARY)
     {
     this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends,
                          useWatcomQuote);
@@ -566,15 +566,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
                           useWatcomQuote);
 
   // maybe create .def file from list of objects
-  if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
+  if (this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY &&
       this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
     {
-    if(this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
+    if(this->GeneratorTarget->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
       {
       std::string name_of_def_file =
         this->GeneratorTarget->GetSupportDirectory();
       name_of_def_file += std::string("/") +
-        this->Target->GetName();
+        this->GeneratorTarget->GetName();
       name_of_def_file += ".def";
       std::string cmd = cmSystemTools::GetCMakeCommand();
       cmd = this->Convert(cmd, cmLocalGenerator::NONE,
@@ -667,7 +667,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
 
   // Compute the directory portion of the install_name setting.
   std::string install_name_dir;
-  if(this->Target->GetType() == cmTarget::SHARED_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY)
     {
     // Get the install_name directory for the build tree.
     install_name_dir =
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0ce13c3..8534986 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -245,7 +245,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
     // Write an empty dependency file.
     cmGeneratedFileStream depFileStream(dependFileNameFull.c_str());
     depFileStream
-      << "# Empty dependencies file for " << this->Target->GetName() << ".\n"
+      << "# Empty dependencies file for "
+      << this->GeneratorTarget->GetName() << ".\n"
       << "# This may be replaced when dependencies are built." << std::endl;
     }
 
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx
index 303ca63..18594bb 100644
--- a/Source/cmMakefileUtilityTargetGenerator.cxx
+++ b/Source/cmMakefileUtilityTargetGenerator.cxx
@@ -42,7 +42,8 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
   this->CreateRuleFile();
 
   *this->BuildFileStream
-    << "# Utility rule file for " << this->Target->GetName() << ".\n\n";
+    << "# Utility rule file for "
+    << this->GeneratorTarget->GetName() << ".\n\n";
 
   if(!this->NoRuleMessages)
     {
@@ -101,11 +102,11 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
 
   // Write the rule.
   this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
-                                      this->Target->GetName(),
+                                      this->GeneratorTarget->GetName(),
                                       depends, commands, true);
 
   // Write the main driver rule to build everything in this target.
-  this->WriteTargetDriverRule(this->Target->GetName(), false);
+  this->WriteTargetDriverRule(this->GeneratorTarget->GetName(), false);
 
   // Write clean target
   this->WriteTargetCleanRules();
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index db7cd7d..fd9a158 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -93,7 +93,7 @@ std::string cmNinjaTargetGenerator::LanguageCompilerRule(
   const std::string& lang) const
 {
   return lang + "_COMPILER__" +
-    cmGlobalNinjaGenerator::EncodeRuleName(this->Target->GetName());
+    cmGlobalNinjaGenerator::EncodeRuleName(this->GeneratorTarget->GetName());
 }
 
 std::string
@@ -190,8 +190,8 @@ ComputeDefines(cmSourceFile const* source, const std::string& language)
 cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
 {
   // Static libraries never depend on other targets for linking.
-  if (this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
-      this->Target->GetType() == cmTarget::OBJECT_LIBRARY)
+  if (this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY ||
+      this->GeneratorTarget->GetType() == cmTarget::OBJECT_LIBRARY)
     return cmNinjaDeps();
 
   cmComputeLinkInformation* cli =
@@ -219,7 +219,8 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
     }
 
   // Add user-specified dependencies.
-  if (const char* linkDepends = this->Target->GetProperty("LINK_DEPENDS"))
+  if (const char* linkDepends =
+      this->GeneratorTarget->GetProperty("LINK_DEPENDS"))
     {
     std::vector<std::string> linkDeps;
     cmSystemTools::ExpandListArgument(linkDepends, linkDeps);
@@ -272,7 +273,7 @@ cmNinjaTargetGenerator
 
 std::string cmNinjaTargetGenerator::GetTargetName() const
 {
-  return this->Target->GetName();
+  return this->GeneratorTarget->GetName();
 }
 
 
@@ -284,10 +285,10 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
     {
     std::string pdbPath;
     std::string compilePdbPath;
-    if(this->Target->GetType() == cmTarget::EXECUTABLE ||
-       this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
-       this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
-       this->Target->GetType() == cmTarget::MODULE_LIBRARY)
+    if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE ||
+       this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY ||
+       this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY ||
+       this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY)
       {
       pdbPath = this->GeneratorTarget->GetPDBDirectory(this->GetConfigName());
       pdbPath += "/";
@@ -411,7 +412,7 @@ cmNinjaTargetGenerator
   if (!compileCmds.empty() && (lang == "C" || lang == "CXX"))
     {
     std::string const iwyu_prop = lang + "_INCLUDE_WHAT_YOU_USE";
-    const char *iwyu = this->Target->GetProperty(iwyu_prop);
+    const char *iwyu = this->GeneratorTarget->GetProperty(iwyu_prop);
     if (iwyu && *iwyu)
       {
       std::string run_iwyu =
@@ -428,7 +429,7 @@ cmNinjaTargetGenerator
   if (!compileCmds.empty() && (lang == "C" || lang == "CXX"))
     {
     std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
-    const char *clauncher = this->Target->GetProperty(clauncher_prop);
+    const char *clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
     if (clauncher && *clauncher)
       {
       std::vector<std::string> launcher_cmd;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e63ed9be398dafbfb05e55f9b64a602327db0aa
commit 5e63ed9be398dafbfb05e55f9b64a602327db0aa
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 8 01:12:25 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:50 2015 +0200

    Genex: Port implementation detail to cmGeneratorTarget.

diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 2d9025e..88d10aa 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -831,8 +831,8 @@ template <typename T>
 std::string
 getLinkedTargetsContent(
   std::vector<T> const &libraries,
-  cmTarget const* target,
-  cmTarget const* headTarget,
+  cmGeneratorTarget const* target,
+  cmGeneratorTarget const* headTarget,
   cmGeneratorExpressionContext *context,
   cmGeneratorExpressionDAGChecker *dagChecker,
   const std::string &interfacePropertyName)
@@ -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 != target)
+    if (it->Target && it->Target != target)
       {
       depString +=
         sep + "$<TARGET_PROPERTY:" +
@@ -858,8 +858,10 @@ getLinkedTargetsContent(
     {
     linkedTargetsContent =
         cmGeneratorExpressionNode::EvaluateDependentExpression(depString,
-                                        target->GetMakefile(), context,
-                                        headTarget, target, dagChecker);
+                                        target->Target->GetMakefile(),
+                                        context,
+                                        headTarget->Target,
+                                        target->Target, dagChecker);
     }
   linkedTargetsContent =
     cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);
@@ -1116,8 +1118,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
          gtgt->GetLinkInterfaceLibraries(context->Config, gHeadTarget, true))
         {
         linkedTargetsContent =
-          getLinkedTargetsContent(iface->Libraries, target,
-                                  headTarget,
+          getLinkedTargetsContent(iface->Libraries, gtgt,
+                                  gHeadTarget,
                                   context, &dagChecker,
                                   interfacePropertyName);
         }
@@ -1128,8 +1130,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
          gtgt->GetLinkImplementationLibraries(context->Config))
         {
         linkedTargetsContent =
-          getLinkedTargetsContent(impl->Libraries, target,
-                                  target,
+          getLinkedTargetsContent(impl->Libraries, gtgt,
+                                  gtgt,
                                   context, &dagChecker,
                                   interfacePropertyName);
         }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b382f3ee3bf7d915718150924fd358a026a72bb
commit 4b382f3ee3bf7d915718150924fd358a026a72bb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 00:29:47 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:49 2015 +0200

    cmGeneratorTarget: Move GetSupportDirectory from cmTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 0f7fc68..f33a9e1 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5512,3 +5512,18 @@ bool cmGeneratorTarget::HasImportLibrary() const
           (this->GetType() == cmTarget::SHARED_LIBRARY ||
            this->Target->IsExecutableWithExports()));
 }
+
+//----------------------------------------------------------------------------
+std::string cmGeneratorTarget::GetSupportDirectory() const
+{
+  std::string dir = this->Makefile->GetCurrentBinaryDirectory();
+  dir += cmake::GetCMakeFilesDirectory();
+  dir += "/";
+  dir += this->GetName();
+#if defined(__VMS)
+  dir += "_dir";
+#else
+  dir += ".dir";
+#endif
+  return dir;
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index c6e56bf..258c556 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -401,6 +401,9 @@ public:
   /** Return whether or not the target has a DLL import library.  */
   bool HasImportLibrary() const;
 
+  /** Get a build-tree directory in which to place target support files.  */
+  std::string GetSupportDirectory() const;
+
   struct SourceFileFlags
   GetTargetSourceFileFlags(const cmSourceFile* sf) const;
 
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index eb4dfee..8f69acd 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2895,13 +2895,14 @@ void cmGlobalGenerator::WriteSummary()
       {
       continue;
       }
-    this->WriteSummary(ti->second);
-    fout << ti->second->GetSupportDirectory() << "\n";
+    cmGeneratorTarget* gt = this->GetGeneratorTarget(ti->second);
+    this->WriteSummary(gt);
+    fout << gt->GetSupportDirectory() << "\n";
     }
 }
 
 //----------------------------------------------------------------------------
-void cmGlobalGenerator::WriteSummary(cmTarget* target)
+void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target)
 {
   // Place the labels file in a per-target support directory.
   std::string dir = target->GetSupportDirectory();
@@ -2944,17 +2945,15 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target)
     fout << "# Source files and their labels\n";
     std::vector<cmSourceFile*> sources;
     std::vector<std::string> configs;
-    target->GetMakefile()->GetConfigurations(configs);
+    target->Target->GetMakefile()->GetConfigurations(configs);
     if (configs.empty())
       {
       configs.push_back("");
       }
-    cmGeneratorTarget* gt =
-        this->GetGeneratorTarget(target);
     for(std::vector<std::string>::const_iterator ci = configs.begin();
         ci != configs.end(); ++ci)
       {
-      gt->GetSourceFiles(sources, *ci);
+      target->GetSourceFiles(sources, *ci);
       }
     std::vector<cmSourceFile*>::const_iterator sourcesEnd
         = cmRemoveDuplicates(sources);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index b22c695..55e3766 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -458,7 +458,7 @@ private:
   void WriteRuleHashes(std::string const& pfile);
 
   void WriteSummary();
-  void WriteSummary(cmTarget* target);
+  void WriteSummary(cmGeneratorTarget* target);
   void FinalizeTargetCompileInfo();
 
   virtual void ForceLinkerLanguages();
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index de84f89..2d2de5f 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -361,7 +361,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   vars.CMTarget = this->Target;
   vars.Language = linkLanguage.c_str();
   vars.Objects = buildObjs.c_str();
-  std::string objectDir = this->Target->GetSupportDirectory();
+  std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
   objectDir = this->Convert(objectDir,
                             cmLocalGenerator::START_OUTPUT,
                             cmLocalGenerator::SHELL);
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 2b019be..8b60a23 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -572,7 +572,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
     if(this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
       {
       std::string name_of_def_file =
-        this->Target->GetSupportDirectory();
+        this->GeneratorTarget->GetSupportDirectory();
       name_of_def_file += std::string("/") +
         this->Target->GetName();
       name_of_def_file += ".def";
@@ -643,7 +643,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   vars.CMTarget = this->Target;
   vars.Language = linkLanguage.c_str();
   vars.Objects = buildObjs.c_str();
-  std::string objectDir = this->Target->GetSupportDirectory();
+  std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
   objectDir = this->Convert(objectDir,
                             cmLocalGenerator::START_OUTPUT,
                             cmLocalGenerator::SHELL);
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 185c234..0ce13c3 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -557,7 +557,8 @@ cmMakefileTargetGenerator
       this->GeneratorTarget->GetCompilePDBPath(this->ConfigName);
     if(targetFullPathCompilePDB.empty())
       {
-      targetFullPathCompilePDB = this->Target->GetSupportDirectory() + "/";
+      targetFullPathCompilePDB =
+          this->GeneratorTarget->GetSupportDirectory() + "/";
       }
     }
 
@@ -594,7 +595,7 @@ cmMakefileTargetGenerator
                   cmLocalGenerator::NONE,
                   cmLocalGenerator::SHELL);
   vars.Object = shellObj.c_str();
-  std::string objectDir = this->Target->GetSupportDirectory();
+  std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
   objectDir = this->Convert(objectDir,
                             cmLocalGenerator::START_OUTPUT,
                             cmLocalGenerator::SHELL);
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 00c00a5..0dc53f3 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -492,9 +492,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
     {
     if(target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
       {
-      std::string dllname = targetOutput;
       std::string name_of_def_file
-        = target.GetSupportDirectory();
+        = gt.GetSupportDirectory();
       name_of_def_file += "/" + target.GetName();
       name_of_def_file += ".def ";
       vars["LINK_FLAGS"] += " /DEF:";
@@ -582,7 +581,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
     vars["TARGET_PDB"] = base + suffix + dbg_suffix;
     }
 
-  const std::string objPath = GetTarget()->GetSupportDirectory();
+  const std::string objPath = GetGeneratorTarget()->GetSupportDirectory();
   vars["OBJECT_DIR"] =
     this->GetLocalGenerator()->ConvertToOutputFormat(
       this->ConvertToNinjaPath(objPath), cmLocalGenerator::SHELL);
@@ -634,7 +633,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
       this->GetLocalGenerator()->ConvertToOutputFormat(
         cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
       std::string name_of_def_file
-        = target.GetSupportDirectory();
+        = gt.GetSupportDirectory();
       name_of_def_file += "/" + target.GetName();
       name_of_def_file += ".def";
       std::string cmd = cmakeCommand;
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index c2daa63..db7cd7d 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -299,7 +299,7 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
               this->GeneratorTarget->GetCompilePDBPath(this->GetConfigName());
       if(compilePdbPath.empty())
         {
-        compilePdbPath = this->Target->GetSupportDirectory() + "/";
+        compilePdbPath = this->GeneratorTarget->GetSupportDirectory() + "/";
         }
       }
 
@@ -568,7 +568,7 @@ cmNinjaTargetGenerator
   std::string const language = source->GetLanguage();
   std::string const sourceFileName =
     language=="RC" ? source->GetFullPath() : this->GetSourceFilePath(source);
-  std::string const objectDir = this->Target->GetSupportDirectory();
+  std::string const objectDir = this->GeneratorTarget->GetSupportDirectory();
   std::string const objectFileName = this->GetObjectFilePath(source);
   std::string const objectFileDir =
     cmSystemTools::GetFilenamePath(objectFileName);
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 378f132..6e3f65f 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -64,7 +64,7 @@ static void SetupSourceFiles(cmGeneratorTarget const* target,
         std::string basename = cmsys::SystemTools::
                                       GetFilenameWithoutLastExtension(absFile);
 
-        std::string rcc_output_dir = target->Target->GetSupportDirectory();
+        std::string rcc_output_dir = target->GetSupportDirectory();
         cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
         std::string rcc_output_file = rcc_output_dir;
         rcc_output_file += "/qrc_" + basename + ".cpp";
@@ -833,7 +833,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
           std::string basename = cmsys::SystemTools::
                                   GetFilenameWithoutLastExtension(absFile);
 
-          std::string rcc_output_dir = target->Target->GetSupportDirectory();
+          std::string rcc_output_dir = target->GetSupportDirectory();
           cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
           std::string rcc_output_file = rcc_output_dir;
           rcc_output_file += "/qrc_" + basename + ".cpp";
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b16bc30..b8beb5c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -382,21 +382,6 @@ cmListFileBacktrace const& cmTarget::GetBacktrace() const
 }
 
 //----------------------------------------------------------------------------
-std::string cmTarget::GetSupportDirectory() const
-{
-  std::string dir = this->Makefile->GetCurrentBinaryDirectory();
-  dir += cmake::GetCMakeFilesDirectory();
-  dir += "/";
-  dir += this->Name;
-#if defined(__VMS)
-  dir += "_dir";
-#else
-  dir += ".dir";
-#endif
-  return dir;
-}
-
-//----------------------------------------------------------------------------
 bool cmTarget::IsExecutableWithExports() const
 {
   return (this->GetType() == cmTarget::EXECUTABLE &&
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 291ef87..01261ed 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -282,9 +282,6 @@ public:
   /** Get a backtrace from the creation of the target.  */
   cmListFileBacktrace const& GetBacktrace() const;
 
-  /** Get a build-tree directory in which to place target support files.  */
-  std::string GetSupportDirectory() const;
-
   /** @return whether this target have a well defined output file name. */
   bool HaveWellDefinedOutputFiles() const;
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df8cb6efec82efa5610915bbadbda474368e46e0
commit df8cb6efec82efa5610915bbadbda474368e46e0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 9 23:45:55 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:49 2015 +0200

    cmGeneratorTarget: Move HasImportLibrary from cmTarget.

diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 7e47261..2d9025e 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1658,7 +1658,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactLinkerTag>
       return std::string();
       }
     return target->GetFullPath(context->Config,
-                               target->Target->HasImportLibrary());
+                               target->HasImportLibrary());
   }
 };
 
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5bf0d0b..0f7fc68 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5487,7 +5487,7 @@ cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
 //----------------------------------------------------------------------------
 bool cmGeneratorTarget::HasImplibGNUtoMS() const
 {
-  return this->Target->HasImportLibrary()
+  return this->HasImportLibrary()
       && this->GetPropertyAsBool("GNUtoMS");
 }
 
@@ -5504,3 +5504,11 @@ bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName,
     }
   return false;
 }
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::HasImportLibrary() const
+{
+  return (this->Target->IsDLLPlatform() &&
+          (this->GetType() == cmTarget::SHARED_LIBRARY ||
+           this->Target->IsExecutableWithExports()));
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index e2be249..c6e56bf 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -398,6 +398,9 @@ public:
   bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
                         const char* newExt = 0) const;
 
+  /** Return whether or not the target has a DLL import library.  */
+  bool HasImportLibrary() const;
+
   struct SourceFileFlags
   GetTargetSourceFileFlags(const cmSourceFile* sf) const;
 
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index f8743d9..00c00a5 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -559,7 +559,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
                                               cmLocalGenerator::SHELL);
     vars["TARGET_IMPLIB"] = impLibPath;
     EnsureParentDirectoryExists(impLibPath);
-    if(target.HasImportLibrary())
+    if(genTarget.HasImportLibrary())
       {
       byproducts.push_back(targetOutputImplib);
       }
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 500b598..291ef87 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -262,9 +262,6 @@ public:
   /** Return whether or not the target is for a DLL platform.  */
   bool IsDLLPlatform() const { return this->DLLPlatform; }
 
-  /** Return whether or not the target has a DLL import library.  */
-  bool HasImportLibrary() const;
-
   /** Return whether this target is a shared library Framework on
       Apple.  */
   bool IsFrameworkOnApple() const;
@@ -463,6 +460,9 @@ private:
 
   void MaybeInvalidatePropertyCache(const std::string& prop);
 
+  /** Return whether or not the target has a DLL import library.  */
+  bool HasImportLibrary() const;
+
   // Internal representation details.
   friend class cmTargetInternals;
   friend class cmGeneratorTarget;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbd9b70dbc2f3277ad3b01c8b80ec8b5646814b8
commit bbd9b70dbc2f3277ad3b01c8b80ec8b5646814b8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 9 23:50:36 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:49 2015 +0200

    cmGeneratorTarget: Move HasImplibGNUtoMS from cmTarget.

diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index fed0dbc..400fa17 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -217,7 +217,7 @@ cmExportBuildFileGenerator
     std::string prop = "IMPORTED_IMPLIB";
     prop += suffix;
     std::string value = target->GetFullPath(config, true);
-    target->Target->GetImplibGNUtoMS(value, value,
+    target->GetImplibGNUtoMS(value, value,
                              "${CMAKE_IMPORT_LIBRARY_SUFFIX}");
     properties[prop] = value;
     }
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index d879c15..5bf0d0b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5483,3 +5483,24 @@ cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
     }
   return "";
 }
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::HasImplibGNUtoMS() const
+{
+  return this->Target->HasImportLibrary()
+      && this->GetPropertyAsBool("GNUtoMS");
+}
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName,
+                                std::string& out, const char* newExt) const
+{
+  if(this->HasImplibGNUtoMS() &&
+     gnuName.size() > 6 && gnuName.substr(gnuName.size()-6) == ".dll.a")
+    {
+    out = gnuName.substr(0, gnuName.size()-6);
+    out += newExt? newExt : ".lib";
+    return true;
+    }
+  return false;
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index b3519de..e2be249 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -390,6 +390,14 @@ public:
   ///! Return the preferred linker language for this target
   std::string GetLinkerLanguage(const std::string& config = "") const;
 
+  /** Does this target have a GNU implib to convert to MS format?  */
+  bool HasImplibGNUtoMS() const;
+
+  /** Convert the given GNU import library name (.dll.a) to a name with a new
+      extension (.lib or ${CMAKE_IMPORT_LIBRARY_SUFFIX}).  */
+  bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
+                        const char* newExt = 0) const;
+
   struct SourceFileFlags
   GetTargetSourceFileFlags(const cmSourceFile* sf) const;
 
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 8c27b6e..e2112d7 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -135,7 +135,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
       filesFrom.push_back(from1);
       filesTo.push_back(to1);
       std::string targetNameImportLib;
-      if(this->Target->Target->GetImplibGNUtoMS(targetNameImport,
+      if(this->Target->GetImplibGNUtoMS(targetNameImport,
                                         targetNameImportLib))
         {
         filesFrom.push_back(fromDirConfig + targetNameImportLib);
@@ -199,7 +199,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
       filesFrom.push_back(from1);
       filesTo.push_back(to1);
       std::string targetNameImportLib;
-      if(this->Target->Target->GetImplibGNUtoMS(targetNameImport,
+      if(this->Target->GetImplibGNUtoMS(targetNameImport,
                                         targetNameImportLib))
         {
         filesFrom.push_back(fromDirConfig + targetNameImportLib);
@@ -387,7 +387,7 @@ cmInstallTargetGenerator::GetInstallFilename(cmTarget const* target,
     if(nameType == NameImplib)
       {
       // Use the import library name.
-      if(!target->GetImplibGNUtoMS(targetNameImport, fname,
+      if(!gtgt->GetImplibGNUtoMS(targetNameImport, fname,
                                    "${CMAKE_IMPORT_LIBRARY_SUFFIX}"))
         {
         fname = targetNameImport;
@@ -416,7 +416,7 @@ cmInstallTargetGenerator::GetInstallFilename(cmTarget const* target,
     if(nameType == NameImplib)
       {
       // Use the import library name.
-      if(!target->GetImplibGNUtoMS(targetNameImport, fname,
+      if(!gtgt->GetImplibGNUtoMS(targetNameImport, fname,
                                    "${CMAKE_IMPORT_LIBRARY_SUFFIX}"))
         {
         fname = targetNameImport;
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index f6b907e..de84f89 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -259,7 +259,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
                                           cmLocalGenerator::START_OUTPUT,
                                           cmLocalGenerator::UNCHANGED));
     std::string implib;
-    if(this->Target->GetImplibGNUtoMS(targetFullPathImport, implib))
+    if(this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib))
       {
       exeCleanFiles.push_back(this->Convert(implib,
                                             cmLocalGenerator::START_OUTPUT,
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 3b3f63e..2b019be 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -410,7 +410,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
         cmLocalGenerator::START_OUTPUT,
         cmLocalGenerator::UNCHANGED));
     std::string implib;
-    if(this->Target->GetImplibGNUtoMS(targetFullPathImport, implib))
+    if(this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib))
       {
       libCleanFiles.push_back(this->Convert(implib,
                                             cmLocalGenerator::START_OUTPUT,
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 6eafeae..185c234 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1516,7 +1516,7 @@ std::string cmMakefileTargetGenerator::GetLinkRule(
                                               const std::string& linkRuleVar)
 {
   std::string linkRule = this->Makefile->GetRequiredDefinition(linkRuleVar);
-  if(this->Target->HasImplibGNUtoMS())
+  if(this->GeneratorTarget->HasImplibGNUtoMS())
     {
     std::string ruleVar = "CMAKE_";
     ruleVar += this->GeneratorTarget->GetLinkerLanguage(this->ConfigName);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index bebdd77..b16bc30 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2199,26 +2199,6 @@ void cmTarget::ComputeVersionedName(std::string& vName,
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::HasImplibGNUtoMS() const
-{
-  return this->HasImportLibrary() && this->GetPropertyAsBool("GNUtoMS");
-}
-
-//----------------------------------------------------------------------------
-bool cmTarget::GetImplibGNUtoMS(std::string const& gnuName,
-                                std::string& out, const char* newExt) const
-{
-  if(this->HasImplibGNUtoMS() &&
-     gnuName.size() > 6 && gnuName.substr(gnuName.size()-6) == ".dll.a")
-    {
-    out = gnuName.substr(0, gnuName.size()-6);
-    out += newExt? newExt : ".lib";
-    return true;
-    }
-  return false;
-}
-
-//----------------------------------------------------------------------------
 void cmTarget::SetPropertyDefault(const std::string& property,
                                   const char* default_value)
 {
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 3bb1ccd..500b598 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -240,14 +240,6 @@ public:
   void
   GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const;
 
-  /** Does this target have a GNU implib to convert to MS format?  */
-  bool HasImplibGNUtoMS() const;
-
-  /** Convert the given GNU import library name (.dll.a) to a name with a new
-      extension (.lib or ${CMAKE_IMPORT_LIBRARY_SUFFIX}).  */
-  bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
-                        const char* newExt = 0) const;
-
   // Get the properties
   cmPropertyMap &GetProperties() const { return this->Properties; }
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61a3053faf69309828c9555795b8b9e6ed91558d
commit 61a3053faf69309828c9555795b8b9e6ed91558d
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 14:10:49 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=dc1f9735fae5fac3884559b8e7b9ec9a51092b4a
commit dc1f9735fae5fac3884559b8e7b9ec9a51092b4a
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 14:10:49 2015 +0200

    cmGeneratorTarget: Port processILibs to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c3dfed9..d879c15 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2068,9 +2068,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 =
@@ -2096,7 +2096,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=36724922064aba82080ffb53eacaa964c5a61d37
commit 36724922064aba82080ffb53eacaa964c5a61d37
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 14:10:49 2015 +0200

    cmGeneratorTarget: Port getTypedProperty to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 38364be..c3dfed9 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3980,18 +3980,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);
@@ -4121,7 +4123,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();
@@ -4173,7 +4175,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=533ab6137307a2355db96c8ea73e6594ec13e81b
commit 533ab6137307a2355db96c8ea73e6594ec13e81b
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 14:10:49 2015 +0200

    cmGeneratorTarget: Port handleSystemIncludesDep to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index caa76fd..38364be 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);
     }
 }
 
@@ -888,7 +889,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=edd2c4805d27824dae35f58fafaf883ade022a5b
commit edd2c4805d27824dae35f58fafaf883ade022a5b
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 14:10:48 2015 +0200

    cmGeneratorTarget: Port LinkImplClosure to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 2f29fa6..caa76fd 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -883,12 +883,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);
       }
 
@@ -2066,12 +2066,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))
       {
@@ -2086,7 +2086,7 @@ void processILibs(const std::string& config,
 }
 
 //----------------------------------------------------------------------------
-const std::vector<const cmTarget*>&
+const std::vector<const cmGeneratorTarget*>&
 cmGeneratorTarget::GetLinkImplementationClosure(
     const std::string& config) const
 {
@@ -3630,10 +3630,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)) \
@@ -4129,7 +4129,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())
@@ -4156,7 +4156,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)
     {
@@ -4166,13 +4166,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 cd994c0..b3519de 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -477,7 +477,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;
@@ -555,8 +555,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=a44fda077251b9241a6ffa782ada1ea78cce7bac
commit a44fda077251b9241a6ffa782ada1ea78cce7bac
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 14:10:48 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=2f8e39bac198cb04fe872fed0bf3b471bb7edb4e
commit 2f8e39bac198cb04fe872fed0bf3b471bb7edb4e
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 14:10:48 2015 +0200

    cmLinkItem: Port to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 5604c53..22843f1 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
@@ -983,7 +980,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 37d7f16..2f29fa6 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -773,8 +773,10 @@ 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)));
+      cmTarget* tgt = this->Makefile->FindTargetToUse(*i);
+      cmGeneratorTarget* gt = tgt ? this->GlobalGenerator
+          ->GetGeneratorTarget(tgt) : 0;
+      this->UtilityItems.insert(cmLinkItem(*i, gt));
       }
     }
   return this->UtilityItems;
@@ -1728,15 +1730,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 +2069,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();
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=64694951477c4fd0f976eb90f4328886798790dd
commit 64694951477c4fd0f976eb90f4328886798790dd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 12:23:19 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 14:10:48 2015 +0200

    cmGeneratorTarget: Move FindTargetToLink from cmTarget.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 4d7b01e..5604c53 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -634,8 +634,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 +648,7 @@ cmTarget const* cmComputeLinkDepends::FindTargetToLink(int depender_index,
       from = depender;
       }
     }
-  return from->Target->FindTargetToLink(name);
+  return from->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;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index a5e35a1..37d7f16 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -4427,7 +4427,7 @@ void cmGeneratorTarget::LookupLinkItems(std::vector<std::string> const& names,
       {
       continue;
       }
-    items.push_back(cmLinkItem(name, this->Target->FindTargetToLink(name)));
+    items.push_back(cmLinkItem(name, this->FindTargetToLink(name)));
     }
 }
 
@@ -5398,7 +5398,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
 
       // The entry is meant for this configuration.
       impl.Libraries.push_back(
-        cmLinkImplItem(name, this->Target->FindTargetToLink(name),
+        cmLinkImplItem(name, this->FindTargetToLink(name),
                        *btIt, evaluated != *le));
       }
 
@@ -5430,12 +5430,48 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
         }
       // Support OLD behavior for CMP0003.
       impl.WrongConfigLibraries.push_back(
-        cmLinkItem(name, this->Target->FindTargetToLink(name)));
+        cmLinkItem(name, this->FindTargetToLink(name)));
       }
     }
 }
 
 //----------------------------------------------------------------------------
+cmGeneratorTarget*
+cmGeneratorTarget::FindTargetToLink(std::string const& name) const
+{
+  cmTarget const* tgt = this->Makefile->FindTargetToUse(name);
+
+  // 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(tgt && tgt->GetType() == cmTarget::EXECUTABLE &&
+     !tgt->IsExecutableWithExports())
+    {
+    tgt = 0;
+    }
+
+  if(tgt && tgt->GetType() == cmTarget::OBJECT_LIBRARY)
+    {
+    std::ostringstream e;
+    e << "Target \"" << this->GetName() << "\" links to "
+      "OBJECT library \"" << tgt->GetName() << "\" but this is not "
+      "allowed.  "
+      "One may link only to STATIC or SHARED libraries, or to executables "
+      "with the ENABLE_EXPORTS property set.";
+    cmake* cm = this->Makefile->GetCMakeInstance();
+    cm->IssueMessage(cmake::FATAL_ERROR, e.str(),
+                     this->Target->GetBacktrace());
+    tgt = 0;
+    }
+
+  if (!tgt)
+    {
+    return 0;
+    }
+  return this->GlobalGenerator->GetGeneratorTarget(tgt);
+}
+
+//----------------------------------------------------------------------------
 std::string
 cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
 {
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 70612f2..cd994c0 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -216,6 +216,8 @@ public:
                                           cmOptionalLinkImplementation& impl,
                                           const cmGeneratorTarget* head) const;
 
+  cmGeneratorTarget* FindTargetToLink(std::string const& name) const;
+
   // Compute the set of languages compiled by the target.  This is
   // computed every time it is called because the languages can change
   // when source file properties are changed and we do not have enough
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 31a9aa7..bebdd77 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2670,37 +2670,6 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
 }
 
 //----------------------------------------------------------------------------
-cmTarget const* cmTarget::FindTargetToLink(std::string const& name) const
-{
-  cmTarget const* tgt = this->Makefile->FindTargetToUse(name);
-
-  // 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(tgt && tgt->GetType() == cmTarget::EXECUTABLE &&
-     !tgt->IsExecutableWithExports())
-    {
-    tgt = 0;
-    }
-
-  if(tgt && tgt->GetType() == cmTarget::OBJECT_LIBRARY)
-    {
-    std::ostringstream e;
-    e << "Target \"" << this->GetName() << "\" links to "
-      "OBJECT library \"" << tgt->GetName() << "\" but this is not "
-      "allowed.  "
-      "One may link only to STATIC or SHARED libraries, or to executables "
-      "with the ENABLE_EXPORTS property set.";
-    cmake* cm = this->Makefile->GetCMakeInstance();
-    cm->IssueMessage(cmake::FATAL_ERROR, e.str(), this->GetBacktrace());
-    tgt = 0;
-    }
-
-  // Return the target found, if any.
-  return tgt;
-}
-
-//----------------------------------------------------------------------------
 std::string cmTarget::CheckCMP0004(std::string const& item) const
 {
   // Strip whitespace off the library names because we used to do this
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 0c1bbd2..3bb1ccd 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -223,8 +223,6 @@ public:
 
   void GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const;
 
-  cmTarget const* FindTargetToLink(std::string const& name) const;
-
   /** Strip off leading and trailing whitespace from an item named in
       the link dependencies of this target.  */
   std::string CheckCMP0004(std::string const& item) const;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05bd28bf6b77c99146a3088e347dc9471502c777
commit 05bd28bf6b77c99146a3088e347dc9471502c777
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 14:10:48 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=4c742b92b4e8088f1663bc55a0f2862ca69123e9
commit 4c742b92b4e8088f1663bc55a0f2862ca69123e9
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 14:10:48 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=d7d27d58401ca7249cd54991f6ffa97df6524acc
commit d7d27d58401ca7249cd54991f6ffa97df6524acc
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 14:10:48 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=5ddc5120c65adf066ff6f074515e9f57b4ee6b45
commit 5ddc5120c65adf066ff6f074515e9f57b4ee6b45
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 14:10:47 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..8c27b6e 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();
-        j != sharedLibs.end(); ++j)
+    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;

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list