Навигация

  • указатель
  • вперёд |
  • назад |
  • CMake 4.3.20260302-g9346ca9 »
  • Documentation »
  • cmake-variables(7) »
  • CMAKE_<LANG>_LINK_FLAGS_<CONFIG>

CMAKE_<LANG>_LINK_FLAGS_<CONFIG>¶

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

Language-wide flags for language <LANG> used when linking for the <CONFIG> configuration. These flags will be passed to all invocations of the compiler which drive linking.

See CMAKE_<LANG>_LINK_FLAGS for the ordering of these flags with respect to other variables. Notably, flags in CMAKE_<LANG>_LINK_FLAGS_<CONFIG> are passed after those in CMAKE_<LANG>_LINK_FLAGS.

Handling Compiler Driver Differences¶

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

To pass options to the linker tool, each compiler driver has its own syntax. The LINKER: prefix and , separator can be used to specify, in a portable way, options to pass to the linker tool. LINKER: is replaced by the appropriate driver option and , by the appropriate driver separator. The driver prefix and driver separator are given by the values of the CMAKE_<LANG>_LINKER_WRAPPER_FLAG and CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP variables.

For example, "LINKER:-z,defs" becomes -Xlinker -z -Xlinker defs for Clang and -Wl,-z,defs for GNU GCC.

The LINKER: prefix supports, as an alternative syntax, specification of arguments using the SHELL: prefix and space as separator. The previous example then becomes "LINKER:SHELL:-z defs".

Примечание

Specifying the SHELL: prefix anywhere other than at the beginning of the LINKER: prefix is not supported.

This support implies to parse and re-quote the content of the variable.

See Also¶

  • CMAKE_<LANG>_LINK_FLAGS

  • CMAKE_<LANG>_FLAGS_<CONFIG>

Оглавление

  • CMAKE_<LANG>_LINK_FLAGS_<CONFIG>
    • Handling Compiler Driver Differences
    • See Also

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

CMAKE_<LANG>_LINK_FLAGS

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

CMAKE_<LANG>_LINK_LIBRARY_SUFFIX

Эта страница

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

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

Навигация

  • указатель
  • вперёд |
  • назад |
  • CMake 4.3.20260302-g9346ca9 »
  • Documentation »
  • cmake-variables(7) »
  • CMAKE_<LANG>_LINK_FLAGS_<CONFIG>
© Авторские права 2000-2026 Kitware, Inc. and Contributors. Создано с использованием Sphinx 8.1.3.