mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
Make CMAKE_LINK_LIBRARY_FILE_FLAG work like CMAKE_LINK_LIBRARY_FLAG
The `CMAKE_LINK_LIBRARY_FILE_FLAG` variable is meant for linkers that want library file paths to be preceded by a flag. This is used only for OpenWatcom to add the `library` argument before library file paths. Refactor the approach to treat `CMAKE_LINK_LIBRARY_FILE_FLAG` as a command-line string fragment to add just before the library file path. This has two advantages: * `CMAKE_LINK_LIBRARY_FILE_FLAG` now works like `CMAKE_LINK_LIBRARY_FLAG`. * `CMAKE_LINK_LIBRARY_FILE_FLAG` can now be an attached flag whose value is the library file path. Technically this is a change in behavior, but this setting was created for internal use and should be rarely used outside of CMake itself. Fixes: #19541
This commit is contained in:
@@ -63,6 +63,7 @@ std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli)
|
||||
continue;
|
||||
}
|
||||
if (item.IsPath) {
|
||||
linkLibs += cli.GetLibLinkFileFlag();
|
||||
linkLibs +=
|
||||
this->ConvertToOutputFormat(this->ConvertToLinkReference(item.Value));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user