CMD_DEPRECATED — CMake 4.4.1 Documentation

# CMD_DEPRECATED

Added in version 4.4.

Command Line:

  `-W[no-][error=]deprecated`

Presets:

  `warnings.deprecated`, `errors.deprecated`

Default:

  Warn

Parent:

  `CMD_AUTHOR`

Warn about use of a deprecated function or package. This is the category triggered by `message(DEPRECATION)`.

Note

If `CMP0218` is not set to `NEW`, `message(DEPRECATION)` invocations, along with builtin deprecation messages that existed prior to CMake 4.4, will ignore this diagnostic state and will instead use the `CMAKE_WARN_DEPRECATED` and `CMAKE_ERROR_DEPRECATED` variables to determine the severity of deprecation messages.