Genex: Add $<LINK_LIBRARY:...>

This generator expression offers the capability, for the link step, to
decorate libraries with prefix/suffix flags and/or adding any specific flag for each
library.

Fixes: #22812, #18751, #20078, #22703
This commit is contained in:
Marc Chevrier
2021-11-01 15:27:05 +01:00
parent 78dd7d5292
commit 42965799b4
131 changed files with 1823 additions and 149 deletions

View File

@@ -75,14 +75,8 @@ void cmLinkLineComputer::ComputeLinkLibs(
BT<std::string> linkLib;
if (item.IsPath == cmComputeLinkInformation::ItemIsPath::Yes) {
if (item.IsObject == cmComputeLinkInformation::ItemIsObject::Yes) {
linkLib.Value += cli.GetObjLinkFileFlag();
} else {
linkLib.Value += cli.GetLibLinkFileFlag();
}
linkLib.Value += this->ConvertToOutputFormat(
this->ConvertToLinkReference(item.Value.Value));
linkLib.Backtrace = item.Value.Backtrace;
linkLib = item.GetFormattedItem(this->ConvertToOutputFormat(
this->ConvertToLinkReference(item.Value.Value)));
} else {
linkLib = item.Value;
}