CMake 3.23 Release Notes

Changes made since CMake 3.22 include the following.

New Features

Presets

  • cmake-presets(7) files now support schema version 4.

  • cmake-presets(7) files now have an optional include field, which allows the files to include other files.

  • cmake-presets(7) gained support for specifying the resolvePackageReferences command line option in a build preset.

Generators

Command-Line

  • The cmake(1) --build command, when used with Visual Studio Generators on projects that set the VS_PACKAGE_REFERENCES target property, now automatically restores package references from NuGet. The cache variable CMAKE_VS_NUGET_PACKAGE_RESTORE may be set to toggle this behavior in a build tree. Use the --resolve-package-references=<on|off|only> command-line option to control the behavior on one invocation.

  • The cmake(1) command line tool gained a --debug-find-pkg= option to enable debug messages under specific find_package() calls.

  • The cmake(1) command line tool gained a --debug-find-var= option to enable debug messages for find_* calls that use specific result variables.

Compilers

  • The IBM Open XL C/C++ compiler, based on LLVM, is now supported with compiler id IBMClang.

  • The MCST LCC compiler is now supported with compiler id LCC. See policy CMP0129.

File-Based API

  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.4.

  • The cmake-file-api(7) "codemodel" version 2 directory object installers field gained a new fileSet installer type.

Commands

  • The define_property() command gained a new INITIALIZE_FROM_VARIABLE option to cause a target property to be initialized from a variable when a target is created.

  • The install(TARGETS) command gained a new FILE_SET argument, which can be used to install header file sets associated with a target.

  • The string(TIMESTAMP) and file(TIMESTAMP) commands now support the %f specifier for microseconds.

  • The target_sources() command gained a new FILE_SET mode, which can be used to add headers as header-only source files of a target.

Variables

Properties

Modules

  • The CheckPIESupported module now supports the OBJC, OBJCXX, CUDA, and HIP languages. It also now honors CMAKE_SYSROOT and CMAKE_OSX_SYSROOT.

  • The ExternalProject module's ExternalProject_Add() command gained support for a USES_TERMINAL_PATCH option to give the patch step exclusive terminal access.

  • The FindCUDAToolkit module now provides a target for libcufft_static_nocallback, if found.

  • The FindGLUT module now provides the GLUT_INCLUDE_DIRS result variable to conform with naming conventions documented in the cmake-developer(7) manual. This supersedes the legacy GLUT_INCLUDE_DIR variable.

  • The FindGTest module now provides a target for GMock, if found.

  • The FindVulkan module now provides a Vulkan_VERSION result variable reporting the version number.

CTest

CPack

Deprecated and Removed Features

  • The cpack(1) undocumented OSXX11 generator has been removed.

Other Changes