LINK_WRAPPERS¶
Added in version 4.5.
List of wrapper names to be prepended to the link commands for a target's output artifact.
This property holds a semicolon-separated list
of names, where each item is a <NAME> keyed to the
CMAKE_LINK_WRAPPER_<NAME> global property.
Note
If a target has multiple wrappers, either via its LINK_WRAPPERS and/or
the INTERFACE_LINK_WRAPPERS inherited from its dependents, the
wrappers will be deduplicated and ordered lexicographically based on their
name in the resulting link command(s).
This property is supported only by Makefile Generators and
Ninja Generators, and is ignored by other generators. Further, it is
supported only when the target's language is one of: C, CXX, CUDA,
OBJC, OBJCXX, Fortran, HIP.
Contents of LINK_WRAPPERS may use "generator expressions" with the syntax
$<...>. See the cmake-generator-expressions(7) manual for
available expressions. See the cmake-buildsystem(7) manual for more
on defining buildsystem properties.
Wrappers apply to the link command of executables, shared libraries, and
module libraries. As with <LANG>_LINKER_LAUNCHER, they do not
apply to STATIC libraries, which are created by the archiver rather than
the linker.
Interaction With Launchers¶
Wrappers are placed outside of any <LANG>_LINKER_LAUNCHER.
The resulting link command is:
<wrappers...> <launcher...> <linker> <arguments...>
The launcher used by ctest(1) (see CTEST_USE_LAUNCHERS)
remains outermost and runs the wrappers as part of the command it launches.
See Also¶
Related properties: