CMake 3.31 Release Notes

Changes made since CMake 3.30 include the following.

New Features

Presets

  • cmake-presets(7) files may now include comments using the key $comment at any level within the JSON object to provide documentation.

  • cmake-presets(7) files may now request graphviz output using the graphviz key in a configure preset.

Generators

Command-Line

Compilers

  • The LFortran compiler is now supported with compiler id LFortran.

Commands

  • The add_custom_command() command gained a CODEGEN option to mark a custom command's outputs as dependencies of a codegen target. See policy CMP0171.

  • The cmake_pkg_config() command was added as an endpoint for using CMake's native pkg-config format parser. The only supported option in this release is EXTRACT, which provides low-level access to the values produced by parsing a pkg-config file. For most users, this is not yet a suitable replacement for the FindPkgConfig module.

  • The file(ARCHIVE_CREATE) command gained a WORKING_DIRECTORY option to specify a working directory for the archiving process.

  • The file(MAKE_DIRECTORY) command gained a RESULT option to capture failure in a result variable.

  • The install(FILES) and install(DIRECTORY) commands' TYPE argument gained support for a LIBEXEC type.

Variables

Properties

Modules

CTest

CPack

Deprecated and Removed Features

Other Changes

Updates

Changes made since CMake 3.31.0 include the following.

3.31.1, 3.31.2, 3.31.3, 3.31.4, 3.31.5, 3.31.6, 3.31.7, 3.31.8, 3,31.9

  • These versions made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions.