cmGeneratorTarget: Add method for LINKER: prefix translation

This commit is contained in:
Marc Chevrier 2021-07-08 13:02:15 +02:00
parent 33d6ba668f
commit 8a93de080c
2 changed files with 10 additions and 0 deletions

View File

@ -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"

View File

@ -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;