Diagnostics¶
CMake diagnostic actions are now tracked in a new state type managed by the
cmake_diagnostic()command. This replaces the old system which sometimes used variables to manage reporting actions and sometimes did not allow management beyond command-line options and presets. The new system also introduces several new diagnostic categories and significantly reduces the cost of adding additional categories in the future. See thecmake-diagnostics(7)manual for a list of available categories.
Commands¶
The
cmake_diagnostic()command was added to manipulate CMake's diagnostic state.The
block()command can now create aDIAGNOSTICSscope.The
include()command now has aNO_DIAGNOSTIC_SCOPEoption.
Deprecated and Removed Features¶
The
-W[no-][error=]devcommand-line options are deprecated. The new spelling is-W[no-][error=]author.The
--warn-uninitializedcommand-line option is deprecated. The new spelling is-Wuninitialized.The
--no-warn-unused-clicommand-line option is deprecated. The new spelling is-Wno-unused-cli.The
CMAKE_WARN_DEPRECATEDandCMAKE_ERROR_DEPRECATEDvariables are deprecated. The newcmake_diagnostic()command should be used instead.