Bläddra i källkod

cmGeneratorTarget: Add method for LINKER: prefix translation

Marc Chevrier 4 år sedan
förälder
incheckning
8a93de080c
2 ändrade filer med 10 tillägg och 0 borttagningar
  1. 7 0
      Source/cmGeneratorTarget.cxx
  2. 3 0
      Source/cmGeneratorTarget.h

+ 7 - 0
Source/cmGeneratorTarget.cxx

@@ -4461,6 +4461,13 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkOptions(
 
   // Last step: replace "LINKER:" prefixed elements by
   // actual linker wrapper
+  return this->ResolveLinkerWrapper(result, language);
+}
+
+std::vector<BT<std::string>>& cmGeneratorTarget::ResolveLinkerWrapper(
+  std::vector<BT<std::string>>& result, const std::string& language) const
+{
+  // replace "LINKER:" prefixed elements by actual linker wrapper
   const std::string wrapper(this->Makefile->GetSafeDefinition(
     "CMAKE_" + language +
     (this->IsDeviceLink() ? "_DEVICE_LINKER_WRAPPER_FLAG"

+ 3 - 0
Source/cmGeneratorTarget.h

@@ -498,6 +498,9 @@ public:
   std::vector<BT<std::string>> GetLinkOptions(
     std::string const& config, std::string const& language) const;
 
+  std::vector<BT<std::string>>& ResolveLinkerWrapper(
+    std::vector<BT<std::string>>& result, const std::string& language) const;
+
   void GetStaticLibraryLinkOptions(std::vector<std::string>& result,
                                    const std::string& config,
                                    const std::string& language) const;