[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-327-g3826f1c

Brad King brad.king at kitware.com
Mon Oct 10 10:34:22 EDT 2016


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  3826f1c832b071df8bb7163d44ad1981724ad70b (commit)
       via  14252b2d864c26a9331421c600744464c9c3c08f (commit)
      from  d3f418e5be2c94933abfccf13e3aea031472c949 (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=3826f1c832b071df8bb7163d44ad1981724ad70b
commit 3826f1c832b071df8bb7163d44ad1981724ad70b
Merge: d3f418e 14252b2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Oct 10 10:34:21 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 10 10:34:21 2016 -0400

    Merge topic 'extract-cmLinkLineComputer' into next
    
    14252b2d Revert topic 'extract-cmLinkLineComputer'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14252b2d864c26a9331421c600744464c9c3c08f
commit 14252b2d864c26a9331421c600744464c9c3c08f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Oct 10 10:34:00 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 10 10:34:00 2016 -0400

    Revert topic 'extract-cmLinkLineComputer'
    
    It will have further discussion in its MR.

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 048667a..e574957 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -300,8 +300,6 @@ set(SRCS
   cmInstallDirectoryGenerator.cxx
   cmLinkedTree.h
   cmLinkItem.h
-  cmLinkLineComputer.cxx
-  cmLinkLineComputer.h
   cmListFileCache.cxx
   cmListFileCache.h
   cmListFileLexer.c
@@ -320,8 +318,6 @@ set(SRCS
   cmMakefileUtilityTargetGenerator.cxx
   cmMessenger.cxx
   cmMessenger.h
-  cmMSVC60LinkLineComputer.cxx
-  cmMSVC60LinkLineComputer.h
   cmOSXBundleGenerator.cxx
   cmOSXBundleGenerator.h
   cmOutputConverter.cxx
@@ -549,8 +545,6 @@ set(SRCS ${SRCS}
   cmNinjaNormalTargetGenerator.h
   cmNinjaUtilityTargetGenerator.cxx
   cmNinjaUtilityTargetGenerator.h
-  cmNinjaLinkLineComputer.cxx
-  cmNinjaLinkLineComputer.h
   )
 
 # Temporary variable for tools targets
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index b995fa1..14ea1a9 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -12,7 +12,6 @@
 #include "cmComputeLinkInformation.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalCommonGenerator.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalCommonGenerator.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
@@ -60,8 +59,7 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags,
   }
 }
 
-void cmCommonTargetGenerator::AddModuleDefinitionFlag(
-  cmLinkLineComputer* linkLineComputer, std::string& flags)
+void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags)
 {
   if (!this->ModuleDefinitionFile) {
     return;
@@ -78,7 +76,7 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(
   // vs6's "cl -link" pass it to the linker.
   std::string flag = defFileFlag;
   flag += this->LocalGenerator->ConvertToOutputFormat(
-    linkLineComputer->ConvertToLinkReference(
+    this->LocalGenerator->ConvertToLinkReference(
       this->ModuleDefinitionFile->GetFullPath()),
     cmOutputConverter::SHELL);
   this->LocalGenerator->AppendFlags(flags, flag);
diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h
index fe27038..707b81e 100644
--- a/Source/cmCommonTargetGenerator.h
+++ b/Source/cmCommonTargetGenerator.h
@@ -16,7 +16,6 @@ class cmGlobalCommonGenerator;
 class cmLocalCommonGenerator;
 class cmMakefile;
 class cmSourceFile;
-class cmLinkLineComputer;
 
 /** \class cmCommonTargetGenerator
  * \brief Common infrastructure for Makefile and Ninja per-target generators
@@ -38,8 +37,7 @@ protected:
   bool GetFeatureAsBool(const std::string& feature);
 
   // Helper to add flag for windows .def file.
-  void AddModuleDefinitionFlag(cmLinkLineComputer* linkLineComputer,
-                               std::string& flags);
+  void AddModuleDefinitionFlag(std::string& flags);
 
   cmGeneratorTarget* GeneratorTarget;
   cmMakefile* Makefile;
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index dd8b36f..959dfdb 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -5,7 +5,6 @@
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalGhsMultiGenerator.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalGhsMultiGenerator.h"
 #include "cmMakefile.h"
 #include "cmSourceFile.h"
@@ -363,15 +362,9 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries(
       this->GeneratorTarget->GetCreateRuleVariable(language, config);
     bool useWatcomQuote =
       this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE");
-    CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
-      this->GetGlobalGenerator()->CreateLinkLineComputer(
-        this->LocalGenerator,
-        this->LocalGenerator->GetStateSnapshot().GetDirectory()));
-    linkLineComputer->SetUseWatcomQuote(useWatcomQuote);
-
     this->LocalGenerator->GetTargetFlags(
-      linkLineComputer.get(), config, linkLibraries, flags, linkFlags,
-      frameworkPath, linkPath, this->GeneratorTarget);
+      config, linkLibraries, flags, linkFlags, frameworkPath, linkPath,
+      this->GeneratorTarget, useWatcomQuote);
     linkFlags = cmSystemTools::TrimWhitespace(linkFlags);
 
     if (!linkPath.empty()) {
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1aa6af1..7132ade 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -20,9 +20,7 @@
 #include "cmGeneratorExpression.h"
 #include "cmGeneratorTarget.h"
 #include "cmInstallGenerator.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalGenerator.h"
-#include "cmMSVC60LinkLineComputer.h"
 #include "cmMakefile.h"
 #include "cmOutputConverter.h"
 #include "cmPolicies.h"
@@ -1414,18 +1412,6 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
   return autogenTargets;
 }
 
-cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer(
-  cmOutputConverter* outputConverter, cmState::Directory stateDir) const
-{
-  return new cmLinkLineComputer(outputConverter, stateDir);
-}
-
-cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer(
-  cmOutputConverter* outputConverter, cmState::Directory stateDir) const
-{
-  return new cmMSVC60LinkLineComputer(outputConverter, stateDir);
-}
-
 void cmGlobalGenerator::FinalizeTargetCompileInfo()
 {
   std::vector<std::string> const langs =
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 38eaa76..74b4547 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -34,9 +34,7 @@ class cmExportBuildFileGenerator;
 class cmExternalMakefileProjectGenerator;
 class cmGeneratorTarget;
 class cmLocalGenerator;
-class cmLinkLineComputer;
 class cmMakefile;
-class cmOutputConverter;
 class cmake;
 
 /** \class cmGlobalGenerator
@@ -107,12 +105,6 @@ public:
    */
   virtual void Generate();
 
-  virtual cmLinkLineComputer* CreateLinkLineComputer(
-    cmOutputConverter* outputConverter, cmState::Directory stateDir) const;
-
-  cmLinkLineComputer* CreateMSVC60LinkLineComputer(
-    cmOutputConverter* outputConverter, cmState::Directory stateDir) const;
-
   /**
    * Set/Get and Clear the enabled languages.
    */
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 67df038..f5a0e68 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -11,7 +11,6 @@
 #include "cmLocalGenerator.h"
 #include "cmLocalNinjaGenerator.h"
 #include "cmMakefile.h"
-#include "cmNinjaLinkLineComputer.h"
 #include "cmOutputConverter.h"
 #include "cmState.h"
 #include "cmSystemTools.h"
@@ -65,14 +64,6 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os,
   os << "# " << comment.substr(lpos) << "\n\n";
 }
 
-cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer(
-  cmOutputConverter* outputConverter, cmState::Directory /* stateDir */) const
-{
-  return new cmNinjaLinkLineComputer(
-    outputConverter,
-    this->LocalGenerators[0]->GetStateSnapshot().GetDirectory(), this);
-}
-
 std::string cmGlobalNinjaGenerator::EncodeRuleName(std::string const& name)
 {
   // Ninja rule names must match "[a-zA-Z0-9_.-]+".  Use ".xx" to encode
@@ -839,8 +830,7 @@ static void EnsureTrailingSlash(std::string& path)
 #endif
 }
 
-std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(
-  const std::string& path) const
+std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path)
 {
   cmLocalNinjaGenerator* ng =
     static_cast<cmLocalNinjaGenerator*>(this->LocalGenerators[0]);
@@ -1431,8 +1421,7 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix()
   EnsureTrailingSlash(this->OutputPathPrefix);
 }
 
-std::string cmGlobalNinjaGenerator::NinjaOutputPath(
-  std::string const& path) const
+std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path)
 {
   if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) {
     return path;
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 6b77a2b..dcf7406 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -70,10 +70,6 @@ public:
   std::string EncodePath(const std::string& path);
   static std::string EncodeDepfileSpace(const std::string& path);
 
-  cmLinkLineComputer* CreateLinkLineComputer(
-    cmOutputConverter* outputConverter,
-    cmState::Directory stateDir) const CM_OVERRIDE;
-
   /**
    * Write the given @a comment to the output stream @a os. It
    * handles new line character properly.
@@ -237,7 +233,7 @@ public:
     return this->RulesFileStream;
   }
 
-  std::string ConvertToNinjaPath(const std::string& path) const;
+  std::string ConvertToNinjaPath(const std::string& path);
   std::string ConvertToNinjaFolderRule(const std::string& path);
 
   struct MapToNinjaPathImpl
@@ -337,7 +333,7 @@ public:
   bool SupportsConsolePool() const;
   bool SupportsImplicitOuts() const;
 
-  std::string NinjaOutputPath(std::string const& path) const;
+  std::string NinjaOutputPath(std::string const& path);
   bool HasOutputPathPrefix() const { return !this->OutputPathPrefix.empty(); }
   void StripNinjaOutputPathPrefixAsSuffix(std::string& path);
 
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
deleted file mode 100644
index 24f3578..0000000
--- a/Source/cmLinkLineComputer.cxx
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
-   file Copyright.txt or https://cmake.org/licensing for details.  */
-
-#include "cmLinkLineComputer.h"
-#include "cmComputeLinkInformation.h"
-#include "cmGeneratorTarget.h"
-#include "cmOutputConverter.h"
-
-cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter,
-                                       cmState::Directory stateDir)
-  : StateDir(stateDir)
-  , OutputConverter(outputConverter)
-  , ForResponse(false)
-  , UseWatcomQuote(false)
-  , Relink(false)
-{
-}
-
-cmLinkLineComputer::~cmLinkLineComputer()
-{
-}
-
-void cmLinkLineComputer::SetUseWatcomQuote(bool useWatcomQuote)
-{
-  this->UseWatcomQuote = useWatcomQuote;
-}
-
-void cmLinkLineComputer::SetForResponse(bool forResponse)
-{
-  this->ForResponse = forResponse;
-}
-
-void cmLinkLineComputer::SetRelink(bool relink)
-{
-  this->Relink = relink;
-}
-
-std::string cmLinkLineComputer::ConvertToLinkReference(
-  std::string const& lib) const
-{
-  std::string relLib = lib;
-
-  if (cmOutputConverter::ContainedInDirectory(
-        this->StateDir.GetCurrentBinary(), lib, this->StateDir)) {
-    relLib = cmOutputConverter::ForceToRelativePath(
-      this->StateDir.GetCurrentBinary(), lib);
-  }
-  return relLib;
-}
-
-std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli)
-{
-  std::string linkLibs;
-  typedef cmComputeLinkInformation::ItemVector ItemVector;
-  ItemVector const& items = cli.GetItems();
-  for (ItemVector::const_iterator li = items.begin(); li != items.end();
-       ++li) {
-    if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) {
-      continue;
-    }
-    if (li->IsPath) {
-      linkLibs +=
-        this->ConvertToOutputFormat(this->ConvertToLinkReference(li->Value));
-    } else {
-      linkLibs += li->Value;
-    }
-    linkLibs += " ";
-  }
-  return linkLibs;
-}
-
-std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input)
-{
-  cmOutputConverter::OutputFormat shellFormat = (this->ForResponse)
-    ? cmOutputConverter::RESPONSE
-    : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE
-                              : cmOutputConverter::SHELL);
-
-  return this->OutputConverter->ConvertToOutputFormat(input, shellFormat);
-}
-
-std::string cmLinkLineComputer::ConvertToOutputForExisting(
-  std::string const& input)
-{
-  cmOutputConverter::OutputFormat shellFormat = (this->ForResponse)
-    ? cmOutputConverter::RESPONSE
-    : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE
-                              : cmOutputConverter::SHELL);
-
-  return this->OutputConverter->ConvertToOutputForExisting(input, shellFormat);
-}
-
-std::string cmLinkLineComputer::ComputeLinkPath(
-  cmComputeLinkInformation& cli, std::string const& libPathFlag,
-  std::string const& libPathTerminator)
-{
-  std::string linkPath;
-  std::vector<std::string> const& libDirs = cli.GetDirectories();
-  for (std::vector<std::string>::const_iterator libDir = libDirs.begin();
-       libDir != libDirs.end(); ++libDir) {
-    std::string libpath = this->ConvertToOutputForExisting(*libDir);
-    linkPath += " " + libPathFlag;
-    linkPath += libpath;
-    linkPath += libPathTerminator;
-    linkPath += " ";
-  }
-  return linkPath;
-}
-
-std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli)
-{
-  std::string rpath;
-  // Check what kind of rpath flags to use.
-  if (cli.GetRuntimeSep().empty()) {
-    // Each rpath entry gets its own option ("-R a -R b -R c")
-    std::vector<std::string> runtimeDirs;
-    cli.GetRPath(runtimeDirs, this->Relink);
-
-    for (std::vector<std::string>::iterator ri = runtimeDirs.begin();
-         ri != runtimeDirs.end(); ++ri) {
-      rpath += cli.GetRuntimeFlag();
-      rpath += this->ConvertToOutputFormat(*ri);
-      rpath += " ";
-    }
-  } else {
-    // All rpath entries are combined ("-Wl,-rpath,a:b:c").
-    std::string rpathString = cli.GetRPathString(this->Relink);
-
-    // Store the rpath option in the stream.
-    if (!rpathString.empty()) {
-      rpath += cli.GetRuntimeFlag();
-      rpath +=
-        this->OutputConverter->EscapeForShell(rpathString, !this->ForResponse);
-      rpath += " ";
-    }
-  }
-  return rpath;
-}
-
-std::string cmLinkLineComputer::ComputeFrameworkPath(
-  cmComputeLinkInformation& cli, std::string const& fwSearchFlag)
-{
-  std::string frameworkPath;
-  if (!fwSearchFlag.empty()) {
-    std::vector<std::string> const& fwDirs = cli.GetFrameworkPaths();
-    for (std::vector<std::string>::const_iterator fdi = fwDirs.begin();
-         fdi != fwDirs.end(); ++fdi) {
-      frameworkPath += fwSearchFlag;
-      frameworkPath += this->ConvertToOutputFormat(*fdi);
-      frameworkPath += " ";
-    }
-  }
-  return frameworkPath;
-}
-
-std::string cmLinkLineComputer::ComputeLinkLibraries(
-  cmComputeLinkInformation& cli, std::string const& stdLibString)
-{
-  std::ostringstream fout;
-  fout << this->ComputeRPath(cli);
-
-  // Write the library flags to the build rule.
-  fout << this->ComputeLinkLibs(cli);
-
-  // Add the linker runtime search path if any.
-  std::string rpath_link = cli.GetRPathLinkString();
-  if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) {
-    fout << cli.GetRPathLinkFlag();
-    fout << this->OutputConverter->EscapeForShell(rpath_link,
-                                                  !this->ForResponse);
-    fout << " ";
-  }
-
-  if (!stdLibString.empty()) {
-    fout << stdLibString << " ";
-  }
-
-  return fout.str();
-}
diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h
deleted file mode 100644
index 1fb9b24..0000000
--- a/Source/cmLinkLineComputer.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
-   file Copyright.txt or https://cmake.org/licensing for details.  */
-
-#ifndef cmLinkLineComputer_h
-#define cmLinkLineComputer_h
-
-#include "cmState.h"
-
-class cmComputeLinkInformation;
-class cmOutputConverter;
-
-class cmLinkLineComputer
-{
-public:
-  cmLinkLineComputer(cmOutputConverter* outputConverter,
-                     cmState::Directory stateDir);
-  virtual ~cmLinkLineComputer();
-
-  void SetUseWatcomQuote(bool useWatcomQuote);
-  void SetForResponse(bool forResponse);
-  void SetRelink(bool relink);
-
-  virtual std::string ConvertToLinkReference(std::string const& input) const;
-
-  std::string ComputeLinkPath(cmComputeLinkInformation& cli,
-                              std::string const& libPathFlag,
-                              std::string const& libPathTerminator);
-
-  std::string ComputeFrameworkPath(cmComputeLinkInformation& cli,
-                                   std::string const& fwSearchFlag);
-
-  std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
-                                   std::string const& stdLibString);
-
-private:
-  std::string ComputeLinkLibs(cmComputeLinkInformation& cli);
-  std::string ComputeRPath(cmComputeLinkInformation& cli);
-
-  std::string ConvertToOutputFormat(std::string const& input);
-  std::string ConvertToOutputForExisting(std::string const& input);
-
-  cmState::Directory StateDir;
-  cmOutputConverter* OutputConverter;
-
-  bool ForResponse;
-  bool UseWatcomQuote;
-  bool Relink;
-};
-
-#endif
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 5c31e3e..2284cf9 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -12,7 +12,6 @@
 #include "cmInstallGenerator.h"
 #include "cmInstallScriptGenerator.h"
 #include "cmInstallTargetGenerator.h"
-#include "cmLinkLineComputer.h"
 #include "cmMakefile.h"
 #include "cmSourceFile.h"
 #include "cmSystemTools.h"
@@ -1149,12 +1148,11 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags,
 }
 
 void cmLocalGenerator::GetTargetFlags(
-  cmLinkLineComputer* linkLineComputer, const std::string& config,
-  std::string& linkLibs, std::string& flags, std::string& linkFlags,
-  std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target)
+  const std::string& config, std::string& linkLibs, std::string& flags,
+  std::string& linkFlags, std::string& frameworkPath, std::string& linkPath,
+  cmGeneratorTarget* target, bool useWatcomQuote)
 {
   const std::string buildType = cmSystemTools::UpperCase(config);
-  cmComputeLinkInformation* pcli = target->GetLinkInformation(config);
   const char* libraryLinkVariable =
     "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library
 
@@ -1204,10 +1202,8 @@ void cmLocalGenerator::GetTargetFlags(
           linkFlags += " ";
         }
       }
-      if (pcli) {
-        this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs,
-                                  frameworkPath, linkPath);
-      }
+      this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target,
+                                false, false, useWatcomQuote);
     } break;
     case cmState::EXECUTABLE: {
       linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS");
@@ -1226,10 +1222,8 @@ void cmLocalGenerator::GetTargetFlags(
         return;
       }
       this->AddLanguageFlags(flags, linkLanguage, buildType);
-      if (pcli) {
-        this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs,
-                                  frameworkPath, linkPath);
-      }
+      this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target,
+                                false, false, useWatcomQuote);
       if (cmSystemTools::IsOn(
             this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) {
         std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") +
@@ -1388,46 +1382,155 @@ std::string cmLocalGenerator::GetTargetFortranFlags(
   return std::string();
 }
 
+std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+  // Work-ardound command line parsing limitations in MSVC 6.0
+  if (this->Makefile->IsOn("MSVC60")) {
+    // Search for the last space.
+    std::string::size_type pos = lib.rfind(' ');
+    if (pos != lib.npos) {
+      // Find the slash after the last space, if any.
+      pos = lib.find('/', pos);
+
+      // Convert the portion of the path with a space to a short path.
+      std::string sp;
+      if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) {
+        // Append the rest of the path with no space.
+        sp += lib.substr(pos);
+
+        return sp;
+      }
+    }
+  }
+#endif
+
+  // Normal behavior.
+  return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib);
+}
+
 /**
  * Output the linking rules on a command line.  For executables,
  * targetLibrary should be a NULL pointer.  For libraries, it should point
  * to the name of the library.  This will not link a library against itself.
  */
-void cmLocalGenerator::OutputLinkLibraries(
-  cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer,
-  std::string& linkLibraries, std::string& frameworkPath,
-  std::string& linkPath)
-{
+void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
+                                           std::string& frameworkPath,
+                                           std::string& linkPath,
+                                           cmGeneratorTarget& tgt, bool relink,
+                                           bool forResponseFile,
+                                           bool useWatcomQuote)
+{
+  OutputFormat shellFormat =
+    (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL);
+  bool escapeAllowMakeVars = !forResponseFile;
+  std::ostringstream fout;
+  std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
+  cmComputeLinkInformation* pcli = tgt.GetLinkInformation(config);
+  if (!pcli) {
+    return;
+  }
   cmComputeLinkInformation& cli = *pcli;
 
   std::string linkLanguage = cli.GetLinkLanguage();
 
+  std::string linkLibs;
+
   std::string libPathFlag =
     this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
   std::string libPathTerminator =
     this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR");
 
+  // Append the framework search path flags.
+  std::string fwSearchFlagVar = "CMAKE_";
+  fwSearchFlagVar += linkLanguage;
+  fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG";
+  const char* fwSearchFlag = this->Makefile->GetDefinition(fwSearchFlagVar);
+  if (fwSearchFlag && *fwSearchFlag) {
+    std::vector<std::string> const& fwDirs = cli.GetFrameworkPaths();
+    for (std::vector<std::string>::const_iterator fdi = fwDirs.begin();
+         fdi != fwDirs.end(); ++fdi) {
+      frameworkPath += fwSearchFlag;
+      frameworkPath += this->ConvertToOutputFormat(*fdi, shellFormat);
+      frameworkPath += " ";
+    }
+  }
+
+  // Append the library search path flags.
+  std::vector<std::string> const& libDirs = cli.GetDirectories();
+  for (std::vector<std::string>::const_iterator libDir = libDirs.begin();
+       libDir != libDirs.end(); ++libDir) {
+    std::string libpath =
+      this->ConvertToOutputForExisting(*libDir, shellFormat);
+    linkPath += " " + libPathFlag;
+    linkPath += libpath;
+    linkPath += libPathTerminator;
+    linkPath += " ";
+  }
+
+  // Append the link items.
+  typedef cmComputeLinkInformation::ItemVector ItemVector;
+  ItemVector const& items = cli.GetItems();
+  for (ItemVector::const_iterator li = items.begin(); li != items.end();
+       ++li) {
+    if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) {
+      continue;
+    }
+    if (li->IsPath) {
+      linkLibs += this->ConvertToOutputFormat(
+        this->ConvertToLinkReference(li->Value), shellFormat);
+    } else {
+      linkLibs += li->Value;
+    }
+    linkLibs += " ";
+  }
+
+  // Check what kind of rpath flags to use.
+  if (cli.GetRuntimeSep().empty()) {
+    // Each rpath entry gets its own option ("-R a -R b -R c")
+    std::vector<std::string> runtimeDirs;
+    cli.GetRPath(runtimeDirs, relink);
+
+    std::string rpath;
+    for (std::vector<std::string>::iterator ri = runtimeDirs.begin();
+         ri != runtimeDirs.end(); ++ri) {
+      rpath += cli.GetRuntimeFlag();
+      rpath += this->ConvertToOutputFormat(*ri, shellFormat);
+      rpath += " ";
+    }
+    fout << rpath;
+  } else {
+    // All rpath entries are combined ("-Wl,-rpath,a:b:c").
+    std::string rpath = cli.GetRPathString(relink);
+
+    // Store the rpath option in the stream.
+    if (!rpath.empty()) {
+      fout << cli.GetRuntimeFlag();
+      fout << this->EscapeForShell(rpath, escapeAllowMakeVars);
+      fout << " ";
+    }
+  }
+
+  // Write the library flags to the build rule.
+  fout << linkLibs;
+
+  // Add the linker runtime search path if any.
+  std::string rpath_link = cli.GetRPathLinkString();
+  if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) {
+    fout << cli.GetRPathLinkFlag();
+    fout << this->EscapeForShell(rpath_link, escapeAllowMakeVars);
+    fout << " ";
+  }
+
   // Add standard libraries for this language.
   std::string standardLibsVar = "CMAKE_";
   standardLibsVar += cli.GetLinkLanguage();
   standardLibsVar += "_STANDARD_LIBRARIES";
-  std::string stdLibString;
   if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) {
-    stdLibString = stdLibs;
+    fout << stdLibs << " ";
   }
 
-  // Append the framework search path flags.
-  std::string fwSearchFlagVar = "CMAKE_";
-  fwSearchFlagVar += linkLanguage;
-  fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG";
-  std::string fwSearchFlag =
-    this->Makefile->GetSafeDefinition(fwSearchFlagVar);
-
-  frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag);
-  linkPath =
-    linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator);
-
-  linkLibraries = linkLineComputer->ComputeLinkLibraries(cli, stdLibString);
+  linkLibraries = fout.str();
 }
 
 std::string cmLocalGenerator::GetLinkLibsCMP0065(
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 69c4101..e16ddab 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -19,13 +19,11 @@
 #include <string>
 #include <vector>
 
-class cmComputeLinkInformation;
 class cmCustomCommandGenerator;
 class cmGeneratorTarget;
 class cmGlobalGenerator;
 class cmMakefile;
 class cmSourceFile;
-class cmLinkLineComputer;
 
 /** \class cmLocalGenerator
  * \brief Create required build files for a directory.
@@ -314,11 +312,10 @@ public:
 
   /** Fill out these strings for the given target.  Libraries to link,
    *  flags, and linkflags. */
-  void GetTargetFlags(cmLinkLineComputer* linkLineComputer,
-                      const std::string& config, std::string& linkLibs,
+  void GetTargetFlags(const std::string& config, std::string& linkLibs,
                       std::string& flags, std::string& linkFlags,
                       std::string& frameworkPath, std::string& linkPath,
-                      cmGeneratorTarget* target);
+                      cmGeneratorTarget* target, bool useWatcomQuote);
   void GetTargetDefines(cmGeneratorTarget const* target,
                         std::string const& config, std::string const& lang,
                         std::set<std::string>& defines) const;
@@ -348,10 +345,10 @@ public:
 
 protected:
   ///! put all the libraries for a target on into the given stream
-  void OutputLinkLibraries(cmComputeLinkInformation* pcli,
-                           cmLinkLineComputer* linkLineComputer,
-                           std::string& linkLibraries,
-                           std::string& frameworkPath, std::string& linkPath);
+  void OutputLinkLibraries(std::string& linkLibraries,
+                           std::string& frameworkPath, std::string& linkPath,
+                           cmGeneratorTarget&, bool relink,
+                           bool forResponseFile, bool useWatcomQuote);
 
   // Expand rule variables in CMake of the type found in language rules
   void ExpandRuleVariables(std::string& string,
@@ -373,6 +370,8 @@ protected:
   std::string& CreateSafeUniqueObjectFileName(const std::string& sin,
                                               std::string const& dir_max);
 
+  virtual std::string ConvertToLinkReference(std::string const& lib);
+
   /** Check whether the native build system supports the given
       definition.  Issues a warning.  */
   virtual bool CheckDefinition(std::string const& define) const;
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index f87aca2..5736581 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -120,6 +120,12 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator()
 
 // Virtual protected methods.
 
+std::string cmLocalNinjaGenerator::ConvertToLinkReference(
+  std::string const& lib)
+{
+  return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib);
+}
+
 std::string cmLocalNinjaGenerator::ConvertToIncludeReference(
   std::string const& path, cmOutputConverter::OutputFormat format,
   bool forceFullPaths)
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index b04788d..3061b57 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -76,6 +76,8 @@ public:
   void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg,
                                cmNinjaDeps& ninjaDeps);
 
+  std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE;
+
   void ComputeObjectFilenames(
     std::map<cmSourceFile const*, std::string>& mapping,
     cmGeneratorTarget const* gt = CM_NULLPTR) CM_OVERRIDE;
diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx
deleted file mode 100644
index 2b6df2a..0000000
--- a/Source/cmMSVC60LinkLineComputer.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
-   file Copyright.txt or https://cmake.org/licensing for details.  */
-
-#include "cmMSVC60LinkLineComputer.h"
-
-#include "cmSystemTools.h"
-
-cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(
-  cmOutputConverter* outputConverter, cmState::Directory stateDir)
-  : cmLinkLineComputer(outputConverter, stateDir)
-{
-}
-
-std::string cmMSVC60LinkLineComputer::ConvertToLinkReference(
-  std::string const& lib) const
-{
-#if defined(_WIN32) && !defined(__CYGWIN__)
-  // Work-ardound command line parsing limitations in MSVC 6.0
-  // Search for the last space.
-  std::string::size_type pos = lib.rfind(' ');
-  if (pos != lib.npos) {
-    // Find the slash after the last space, if any.
-    pos = lib.find('/', pos);
-
-    // Convert the portion of the path with a space to a short path.
-    std::string sp;
-    if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) {
-      // Append the rest of the path with no space.
-      sp += lib.substr(pos);
-      return sp;
-    }
-  }
-#endif
-
-  return cmLinkLineComputer::ConvertToLinkReference(lib);
-}
diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h
deleted file mode 100644
index ca9da31..0000000
--- a/Source/cmMSVC60LinkLineComputer.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
-   file Copyright.txt or https://cmake.org/licensing for details.  */
-
-#ifndef cmMSVC60LinkLineComputer_h
-#define cmMSVC60LinkLineComputer_h
-
-#include "cmLinkLineComputer.h"
-
-class cmMSVC60LinkLineComputer : public cmLinkLineComputer
-{
-public:
-  cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter,
-                           cmState::Directory stateDir);
-
-  std::string ConvertToLinkReference(std::string const& input) const
-    CM_OVERRIDE;
-};
-
-#endif
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index bfc4857..79168d8 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -5,7 +5,6 @@
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalGenerator.h"
 #include "cmLocalUnixMakefileGenerator3.h"
 #include "cmMakefile.h"
@@ -216,14 +215,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   this->LocalGenerator->AppendFlags(
     linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
 
-  {
-    CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
-      this->CreateLinkLineComputer(
-        this->LocalGenerator,
-        this->LocalGenerator->GetStateSnapshot().GetDirectory()));
-
-    this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags);
-  }
+  this->AddModuleDefinitionFlag(linkFlags);
 
   // Construct a list of files associated with this executable that
   // may need to be cleaned.
@@ -304,18 +296,10 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
     // Set path conversion for link script shells.
     this->LocalGenerator->SetLinkScriptShell(useLinkScript);
 
-    CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
-      this->CreateLinkLineComputer(
-        this->LocalGenerator,
-        this->LocalGenerator->GetStateSnapshot().GetDirectory()));
-    linkLineComputer->SetForResponse(useResponseFileForLibs);
-    linkLineComputer->SetUseWatcomQuote(useWatcomQuote);
-    linkLineComputer->SetRelink(relink);
-
     // Collect up flags to link in needed libraries.
     std::string linkLibs;
-    this->CreateLinkLibs(linkLineComputer.get(), linkLibs,
-                         useResponseFileForLibs, depends);
+    this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends,
+                         useWatcomQuote);
 
     // Construct object file lists that may be needed to expand the
     // rule.
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 4488f06..8e25f43 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -5,7 +5,6 @@
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalGenerator.h"
 #include "cmLocalUnixMakefileGenerator3.h"
 #include "cmMakefile.h"
@@ -160,13 +159,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink)
 
   this->LocalGenerator->AddConfigVariableFlags(
     extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName);
-
-  CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
-    this->CreateLinkLineComputer(
-      this->LocalGenerator,
-      this->LocalGenerator->GetStateSnapshot().GetDirectory()));
-
-  this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags);
+  this->AddModuleDefinitionFlag(extraFlags);
 
   if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) {
     this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed");
@@ -191,13 +184,7 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink)
     extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
   this->LocalGenerator->AddConfigVariableFlags(
     extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName);
-
-  CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
-    this->CreateLinkLineComputer(
-      this->LocalGenerator,
-      this->LocalGenerator->GetStateSnapshot().GetDirectory()));
-
-  this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags);
+  this->AddModuleDefinitionFlag(extraFlags);
 
   this->WriteLibraryRules(linkRuleVar, extraFlags, relink);
 }
@@ -504,17 +491,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
     // Collect up flags to link in needed libraries.
     std::string linkLibs;
     if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) {
-
-      CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
-        this->CreateLinkLineComputer(
-          this->LocalGenerator,
-          this->LocalGenerator->GetStateSnapshot().GetDirectory()));
-      linkLineComputer->SetForResponse(useResponseFileForLibs);
-      linkLineComputer->SetUseWatcomQuote(useWatcomQuote);
-      linkLineComputer->SetRelink(relink);
-
-      this->CreateLinkLibs(linkLineComputer.get(), linkLibs,
-                           useResponseFileForLibs, depends);
+      this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends,
+                           useWatcomQuote);
     }
 
     // Construct object file lists that may be needed to expand the
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 29df0a0..14102ef 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -10,7 +10,6 @@
 #include "cmGeneratorExpression.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalGenerator.h"
 #include "cmLocalUnixMakefileGenerator3.h"
 #include "cmMakefile.h"
@@ -1584,28 +1583,15 @@ std::string cmMakefileTargetGenerator::CreateResponseFile(
   return responseFileName;
 }
 
-cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer(
-  cmOutputConverter* outputConverter, cmState::Directory stateDir)
-{
-  if (this->Makefile->IsOn("MSVC60")) {
-    return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter,
-                                                               stateDir);
-  }
-  return this->GlobalGenerator->CreateLinkLineComputer(outputConverter,
-                                                       stateDir);
-}
-
 void cmMakefileTargetGenerator::CreateLinkLibs(
-  cmLinkLineComputer* linkLineComputer, std::string& linkLibs,
-  bool useResponseFile, std::vector<std::string>& makefile_depends)
+  std::string& linkLibs, bool relink, bool useResponseFile,
+  std::vector<std::string>& makefile_depends, bool useWatcomQuote)
 {
   std::string frameworkPath;
   std::string linkPath;
-  std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
-  cmComputeLinkInformation* pcli =
-    this->GeneratorTarget->GetLinkInformation(config);
-  this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs,
-                                            frameworkPath, linkPath);
+  this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath,
+                                            *this->GeneratorTarget, relink,
+                                            useResponseFile, useWatcomQuote);
   linkLibs = frameworkPath + linkPath + linkLibs;
 
   if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) {
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 69d9d28..df7b6aa 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -20,7 +20,6 @@ class cmGeneratedFileStream;
 class cmGeneratorTarget;
 class cmGlobalUnixMakefileGenerator3;
 class cmSourceFile;
-class cmLinkLineComputer;
 
 /** \class cmMakefileTargetGenerator
  * \brief Support Routines for writing makefiles
@@ -141,9 +140,6 @@ protected:
                         std::vector<std::string>& makefile_commands,
                         std::vector<std::string>& makefile_depends);
 
-  cmLinkLineComputer* CreateLinkLineComputer(
-    cmOutputConverter* outputConverter, cmState::Directory stateDir);
-
   /** Create a response file with the given set of options.  Returns
       the relative path from the target build working directory to the
       response file name.  */
@@ -154,9 +150,9 @@ protected:
   bool CheckUseResponseFileForLibraries(std::string const& l) const;
 
   /** Create list of flags for link libraries. */
-  void CreateLinkLibs(cmLinkLineComputer* linkLineComputer,
-                      std::string& linkLibs, bool useResponseFile,
-                      std::vector<std::string>& makefile_depends);
+  void CreateLinkLibs(std::string& linkLibs, bool relink, bool useResponseFile,
+                      std::vector<std::string>& makefile_depends,
+                      bool useWatcomQuote);
 
   /** Create lists of object files for linking and cleaning.  */
   void CreateObjectLists(bool useLinkScript, bool useArchiveRules,
diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx
deleted file mode 100644
index 3dcb20b..0000000
--- a/Source/cmNinjaLinkLineComputer.cxx
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
-   file Copyright.txt or https://cmake.org/licensing for details.  */
-
-#include "cmNinjaLinkLineComputer.h"
-#include "cmGlobalNinjaGenerator.h"
-
-cmNinjaLinkLineComputer::cmNinjaLinkLineComputer(
-  cmOutputConverter* outputConverter, cmState::Directory stateDir,
-  cmGlobalNinjaGenerator const* gg)
-  : cmLinkLineComputer(outputConverter, stateDir)
-  , GG(gg)
-{
-}
-
-std::string cmNinjaLinkLineComputer::ConvertToLinkReference(
-  std::string const& lib) const
-{
-  return GG->ConvertToNinjaPath(lib);
-}
diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h
deleted file mode 100644
index a108568..0000000
--- a/Source/cmNinjaLinkLineComputer.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
-   file Copyright.txt or https://cmake.org/licensing for details.  */
-
-#ifndef cmNinjaLinkLineComputer_h
-#define cmNinjaLinkLineComputer_h
-
-#include "cmLinkLineComputer.h"
-#include "cmState.h"
-
-class cmGlobalNinjaGenerator;
-
-class cmNinjaLinkLineComputer : public cmLinkLineComputer
-{
-public:
-  cmNinjaLinkLineComputer(cmOutputConverter* outputConverter,
-                          cmState::Directory stateDir,
-                          cmGlobalNinjaGenerator const* gg);
-
-  std::string ConvertToLinkReference(std::string const& input) const
-    CM_OVERRIDE;
-
-private:
-  cmGlobalNinjaGenerator const* GG;
-};
-
-#endif
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index ab086eb..095c703 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -8,7 +8,6 @@
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalNinjaGenerator.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalGenerator.h"
 #include "cmLocalNinjaGenerator.h"
 #include "cmMakefile.h"
@@ -471,15 +470,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
   vars["TARGET_FILE"] =
     localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL);
 
-  CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
-    this->GetGlobalGenerator()->CreateLinkLineComputer(
-      this->GetLocalGenerator(),
-      this->GetLocalGenerator()->GetStateSnapshot().GetDirectory()));
-  linkLineComputer->SetUseWatcomQuote(useWatcomQuote);
-
-  localGen.GetTargetFlags(
-    linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"],
-    vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, &genTarget);
+  localGen.GetTargetFlags(this->GetConfigName(), vars["LINK_LIBRARIES"],
+                          vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath,
+                          linkPath, &genTarget, useWatcomQuote);
   if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") &&
       (gt.GetType() == cmState::SHARED_LIBRARY ||
        gt.IsExecutableWithExports())) {
@@ -504,7 +497,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
 
   this->addPoolNinjaVariable("JOB_POOL_LINK", &gt, vars);
 
-  this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]);
+  this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]);
   vars["LINK_FLAGS"] =
     cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]);
 
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index e0fcb75..a2bdf49 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -7,7 +7,6 @@
 #include "cmFileMonitor.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalGenerator.h"
-#include "cmLinkLineComputer.h"
 #include "cmListFileCache.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
@@ -729,10 +728,8 @@ static Json::Value DumpTarget(cmGeneratorTarget* target,
     std::string linkLanguageFlags;
     std::string frameworkPath;
     std::string linkPath;
-    cmLinkLineComputer linkLineComputer(lg,
-                                        lg->GetStateSnapshot().GetDirectory());
-    lg->GetTargetFlags(&linkLineComputer, config, linkLibs, linkLanguageFlags,
-                       linkFlags, frameworkPath, linkPath, target);
+    lg->GetTargetFlags(config, linkLibs, linkLanguageFlags, linkFlags,
+                       frameworkPath, linkPath, target, false);
 
     linkLibs = cmSystemTools::TrimWhitespace(linkLibs);
     linkFlags = cmSystemTools::TrimWhitespace(linkFlags);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e400c35..14124f8 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -12,7 +12,6 @@
 #include "cmGeneratorTarget.h"
 #include "cmGlobalGenerator.h"
 #include "cmGlobalGeneratorFactory.h"
-#include "cmLinkLineComputer.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
 #include "cmMessenger.h"
@@ -583,10 +582,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
     gg->CreateGenerationObjects();
     cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName());
     cmLocalGenerator* lg = gtgt->GetLocalGenerator();
-    cmLinkLineComputer linkLineComputer(lg,
-                                        lg->GetStateSnapshot().GetDirectory());
-    lg->GetTargetFlags(&linkLineComputer, buildType, linkLibs, flags,
-                       linkFlags, frameworkPath, linkPath, gtgt);
+    lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath,
+                       linkPath, gtgt, false);
     linkLibs = frameworkPath + linkPath + linkLibs;
 
     printf("%s\n", linkLibs.c_str());
diff --git a/bootstrap b/bootstrap
index fb8b1eb..889cc33 100755
--- a/bootstrap
+++ b/bootstrap
@@ -297,8 +297,6 @@ CMAKE_CXX_SOURCES="\
   cmFileTimeComparison \
   cmGlobalUnixMakefileGenerator3 \
   cmLocalUnixMakefileGenerator3 \
-  cmLinkLineComputer \
-  cmMSVC60LinkLineComputer \
   cmMakefileExecutableTargetGenerator \
   cmMakefileLibraryTargetGenerator \
   cmMakefileTargetGenerator \

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

Summary of changes:
 Source/CMakeLists.txt                          |    6 -
 Source/cmCommonTargetGenerator.cxx             |    6 +-
 Source/cmCommonTargetGenerator.h               |    4 +-
 Source/cmGhsMultiTargetGenerator.cxx           |   11 +-
 Source/cmGlobalGenerator.cxx                   |   14 --
 Source/cmGlobalGenerator.h                     |    8 --
 Source/cmGlobalNinjaGenerator.cxx              |   15 +-
 Source/cmGlobalNinjaGenerator.h                |    8 +-
 Source/cmLinkLineComputer.cxx                  |  179 ------------------------
 Source/cmLinkLineComputer.h                    |   50 -------
 Source/cmLocalGenerator.cxx                    |  167 +++++++++++++++++-----
 Source/cmLocalGenerator.h                      |   17 ++-
 Source/cmLocalNinjaGenerator.cxx               |    6 +
 Source/cmLocalNinjaGenerator.h                 |    2 +
 Source/cmMSVC60LinkLineComputer.cxx            |   36 -----
 Source/cmMSVC60LinkLineComputer.h              |   19 ---
 Source/cmMakefileExecutableTargetGenerator.cxx |   22 +--
 Source/cmMakefileLibraryTargetGenerator.cxx    |   30 +---
 Source/cmMakefileTargetGenerator.cxx           |   24 +---
 Source/cmMakefileTargetGenerator.h             |   10 +-
 Source/cmNinjaLinkLineComputer.cxx             |   19 ---
 Source/cmNinjaLinkLineComputer.h               |   26 ----
 Source/cmNinjaNormalTargetGenerator.cxx        |   15 +-
 Source/cmServerProtocol.cxx                    |    7 +-
 Source/cmake.cxx                               |    7 +-
 bootstrap                                      |    2 -
 26 files changed, 183 insertions(+), 527 deletions(-)
 delete mode 100644 Source/cmLinkLineComputer.cxx
 delete mode 100644 Source/cmLinkLineComputer.h
 delete mode 100644 Source/cmMSVC60LinkLineComputer.cxx
 delete mode 100644 Source/cmMSVC60LinkLineComputer.h
 delete mode 100644 Source/cmNinjaLinkLineComputer.cxx
 delete mode 100644 Source/cmNinjaLinkLineComputer.h


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list