From 8a93de080c7c053237b3f34bc4f8312434e524bf Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Thu, 8 Jul 2021 13:02:15 +0200 Subject: cmGeneratorTarget: Add method for LINKER: prefix translation --- Source/cmGeneratorTarget.cxx | 7 +++++++ Source/cmGeneratorTarget.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index f035bd0..300c13b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4461,6 +4461,13 @@ std::vector> cmGeneratorTarget::GetLinkOptions( // Last step: replace "LINKER:" prefixed elements by // actual linker wrapper + return this->ResolveLinkerWrapper(result, language); +} + +std::vector>& cmGeneratorTarget::ResolveLinkerWrapper( + std::vector>& 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" diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index e1909a4..09f4167 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -498,6 +498,9 @@ public: std::vector> GetLinkOptions( std::string const& config, std::string const& language) const; + std::vector>& ResolveLinkerWrapper( + std::vector>& result, const std::string& language) const; + void GetStaticLibraryLinkOptions(std::vector& result, const std::string& config, const std::string& language) const; -- cgit v0.12