Spec-Zone.ru › CMake

CMAKE_WARN_DEPRECATED

Deprecated since version 4.4.

Whether to issue warnings for deprecated functionality.

This is a deprecated mechanism for interacting with the CMD_DEPRECATED diagnostic. If policy CMP0218 is set to NEW, this variable is ignored.

If policy CMP0218 is not set to NEW, the message() command's DEPRECATION message type will use CMAKE_WARN_DEPRECATED and CMAKE_ERROR_DEPRECATED to determine the severity of a deprecation diagnostic. The severity will be:

  • IGNORE, if CMAKE_WARN_DEPRECATED is OFF and CMAKE_ERROR_DEPRECATED is unset or OFF.
  • WARN, if CMAKE_WARN_DEPRECATED is unset or ON and CMAKE_ERROR_DEPRECATED is unset or OFF.
  • FATAL_ERROR if CMAKE_ERROR_DEPRECATED is ON.

Setting CMAKE_WARN_DEPRECATED in the cache will alter the default state of the CMD_DEPRECATED diagnostic; however, the -W[no-][error=]deprecated option, and warnings.deprecated and/or errors.deprecated preset fields, will take precedence. CMake will also update the cached value of CMAKE_WARN_DEPRECATED to reflect the actual state of the diagnostic as of the start of script execution.

© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/variable/CMAKE_WARN_DEPRECATED.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API