Навигация

  • указатель
  • вперёд |
  • назад |
  • CMake 4.5.20261019-g7ed8fa4 »
  • Documentation »
  • cmake-properties(7) »
  • CMAKE_LINK_WRAPPER_<NAME>

CMAKE_LINK_WRAPPER_<NAME>¶

Добавлено в версии 4.5.

Command line to be prepended to link commands.

This property holds a command line to be used with the LINK_WRAPPERS and/or INTERFACE_LINK_WRAPPERS target properties. Named values in those properties (which are semicolon-separated lists) will reference the correspondingly-named CMAKE_LINK_WRAPPER_<NAME> and prepend the link command for the output artifact of the given target or its consumer(s) with the value of this property.

This property is supported only by Makefile Generators and Ninja Generators, and is ignored by other generators.

The value is a semicolon-separated list of command line arguments. Empty arguments are preserved, and a literal semicolon within an argument may be written as \;.

Contents of CMAKE_LINK_WRAPPER_<NAME> may use generator expressions with the syntax $<...>. See the cmake-buildsystem(7) manual for more on defining buildsystem properties.

Example¶

add_library(iface INTERFACE)
add_executable(main main.c)
target_link_libraries(main PRIVATE iface)

set_property(GLOBAL
  PROPERTY CMAKE_LINK_WRAPPER_2_PYTHON_WRAPPER
    "${Python_EXECUTABLE}" my_wrapper.py
)
set_property(GLOBAL
  PROPERTY CMAKE_LINK_WRAPPER_1_TIME
    "${CMAKE_COMMAND}" -E time
)

set_target_properties(iface PROPERTIES
  INTERFACE_LINK_WRAPPERS 1_TIME
)
set_target_properties(main PROPERTIES
  LINK_WRAPPERS 2_PYTHON_WRAPPER
)

Here, the link command for main will look like:

/path/to/cmake -E time /path/to/python my_wrapper.py ...

See Also¶

  • CMAKE_COMPILE_WRAPPER_<NAME>

  • INTERFACE_LINK_WRAPPERS

  • LINK_WRAPPERS

  • <LANG>_LINKER_LAUNCHER

Оглавление

  • CMAKE_LINK_WRAPPER_<NAME>
    • Example
    • See Also

Предыдущий раздел

CMAKE_HIP_KNOWN_FEATURES

Следующий раздел

CMAKE_SYCL_KNOWN_FEATURES

Эта страница

  • Исходный текст

Быстрый поиск

Навигация

  • указатель
  • вперёд |
  • назад |
  • CMake 4.5.20261019-g7ed8fa4 »
  • Documentation »
  • cmake-properties(7) »
  • CMAKE_LINK_WRAPPER_<NAME>
© Авторские права 2000-2026 Kitware, Inc. and Contributors. Создано с использованием Sphinx 8.1.3.