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 the cmake-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 a DIAGNOSTICS scope.

  • The include() command now has a NO_DIAGNOSTIC_SCOPE option.

Deprecated and Removed Features