瀏覽

  • 索引
  • 下一頁 |
  • 上一頁 |
  • CMake »
  • Documentation »
  • cmake-properties(7) »
  • LINK_WHAT_YOU_USE

LINK_WHAT_YOU_USE¶

在 3.7 版被加入.

This is a boolean option that, when set to TRUE, adds a link-time check to print a list of shared libraries that are being linked but provide no symbols used by the target. This is intended as a lint.

The flag specified by CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG will be passed to the linker so that all libraries specified on the command line will be linked into the target. Then the command specified by CMAKE_LINK_WHAT_YOU_USE_CHECK will run after the target is linked to check the binary for unnecessarily-linked shared libraries.

備註

For now, it is only supported for ELF platforms and is only applicable to executable and shared or module library targets. This property will be ignored for any other targets and configurations.

This property is initialized by the value of the CMAKE_LINK_WHAT_YOU_USE variable if it is set when a target is created.

上個主題

LINK_WARNING_AS_ERROR

下個主題

LINKER_LANGUAGE

本頁

  • 顯示原始碼

快速搜尋

瀏覽

  • 索引
  • 下一頁 |
  • 上一頁 |
  • CMake »
  • Documentation »
  • cmake-properties(7) »
  • LINK_WHAT_YOU_USE
© 版權所有 2000-2025 Kitware, Inc. and Contributors. 使用 Sphinx 8.1.3 建立。