瀏覽

  • 索引
  • 下一頁 |
  • 上一頁 |
  • CMake 4.5.20261019-g7ed8fa4 »
  • 文件 »
  • cmake-屬性(7) »
  • LINK_WRAPPERS

LINK_WRAPPERS¶

在 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.

備註

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 生成器 and Ninja 生成器, 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-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.

另請參見¶

相關屬性:

  • COMPILE_WRAPPERS

  • INTERFACE_LINK_WRAPPERS

  • <LANG>_LINKER_LAUNCHER

目次表

  • LINK_WRAPPERS
    • Interaction With Launchers
    • 另請參見

上個話題

LINK_WHAT_YOU_USE

下個話題

LINKER_LANGUAGE

本頁

  • 顯示來源碼

快速搜尋

瀏覽

  • 索引
  • 下一頁 |
  • 上一頁 |
  • CMake 4.5.20261019-g7ed8fa4 »
  • 文件 »
  • cmake-屬性(7) »
  • LINK_WRAPPERS
© 著作權 2000-2026 Kitware, Inc. and Contributors. 使用 Sphinx 8.1.3 建立。