瀏覽

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

LINK_WARNING_AS_ERROR¶

在 4.0 版被加入.

Specify whether to treat warnings on link as errors. If enabled, adds a flag to treat warnings on link as errors. If the cmake --link-no-warning-as-error option is given on the cmake(1) command line, this property is ignored.

This property takes a semicolon-separated-list of the following values:

  • LINKER: treat the linker warnings as errors.

  • DRIVER: treat the compiler warnings as errors when used to drive the link step. See the COMPILE_WARNING_AS_ERROR target property for more information.

Moreover, for consistency with the COMPILE_WARNING_AS_ERROR target property, a boolean value can be specified:

  • True value: this is equivalent to LINKER and DRIVER values.

  • False value: deactivate this feature for the target.

This property is not implemented for all linkers. It is silently ignored if there is no implementation for the linker being used. The currently implemented compiler linker IDs are:

  • AIX

  • AppleClang

  • GNU

  • GNUgold

  • LLD

  • MOLD

  • MSVC

  • Solaris

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

上個主題

LINK_SEARCH_START_STATIC

下個主題

LINK_WHAT_YOU_USE

本頁

  • 顯示原始碼

快速搜尋

瀏覽

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