CMake 3.26 Release Notes¶
Changes made since CMake 3.25 include the following.
New Features¶
Languages¶
- The - ASM_MARMASMlanguage was added to support the Microsoft ARM assembler language.
Command-Line¶
- The - cmake -E copycommand-line tool now supports a- -targument.
- The - cmake -E copy_directory_if_differentcommand-line tool was added.
Configure Log¶
- CMake now writes a YAML log of configure-time checks to - CMakeFiles/CMakeConfigureLog.yamlunder the top of the build tree. See the- cmake-configure-log(7)manual.
File-Based API¶
- The - cmake-file-api(7)"codemodel" version 2- versionfield has been updated to 2.5.
- The - cmake-file-api(7)"codemodel" version 2 "target" object gained a new- fileSetsfield and associated- fileSetIndexfield to- sourcesobjects.
- The - cmake-file-api(7)gained a new "configureLog" object kind that enables stable access to the- cmake-configure-log(7).
Commands¶
- The - add_custom_command()and- add_custom_target()commands now support- generator expressionsin their- COMMENToption.
- The - message()command gained a- CONFIGURE_LOGmode to record an entry in the- cmake-configure-log(7).
- The - string(TIMESTAMP)and- file(TIMESTAMP)commands now support the- %zand- %Zspecifiers for the time zone.
- The - try_compile()and- try_run()commands gained a- LOG_DESCRIPTIONoption specifying text to be recorded in the- cmake-configure-log(7).
- The - try_compile()and- try_run()commands gained a- NO_LOGoption to skip recording a- cmake-configure-log(7)entry.
Variables¶
- The - CMAKE_<LANG>_COMPILER_FRONTEND_VARIANTvariable is now set for- GNU,- MSVC, and- AppleClangcompilers that have only one frontend variant.
- A - CMAKE_VS_VERSION_BUILD_NUMBERvariable is now set by Visual Studio Generators for VS 2017 and above to report the four-component Visual Studio version number.
Properties¶
- The - <LANG>_CLANG_TIDY_EXPORT_FIXES_DIRtarget property was added to allow the- clang-tidytool to export its suggested fixes to a set of- .yamlfiles. A new- CMAKE_<LANG>_CLANG_TIDY_EXPORT_FIXES_DIRvariable was created to initialize this property.
- The - XCODE_EMBED_EXTENSIONKIT_EXTENSIONStarget property was added to tell the- Xcodegenerator to embed ExtensionKit-based extensions such as extensions using the Background Assets framework. Aspects of the embedding can be customized with:
Modules¶
- The - ExternalProjectmodule's- ExternalProject_Add()command gained an- INSTALL_BYPRODUCTSoption to specify files generated by the- installstep.
- The - FindCUDAToolkitmodule:- gained support for the - sbsa-linuxcross compilation target, and
- now provides an imported target for - nvrtc_static, if found.
 
- The - FindImageMagickmodule now provides imported targets.
- The - FindPython3and- FindPythonmodules gained support for the Stable Application Binary Interface.
- The - UseSWIGmodule gained support for the- perl5language.
Generator Expressions¶
- The - $<BUILD_LOCAL_INTERFACE:...>generator expression was added to prevent usage requirements from being exported to dependent projects.
CTest¶
- The - CTEST_NO_TESTS_ACTIONenvironment variable was added to provide a default value for the- --no-tests=<action>command line argument of- ctest(1).
Deprecated and Removed Features¶
- The - CMakeFiles/CMakeOutput.logand- CMakeFiles/CMakeError.logfiles are no longer populated by CMake's built-in modules.- cmake(1)no longer suggests looking at them after a- CMake Erroroccurs. Information previously logged to those files is instead logged to the- cmake-configure-log(7).
- On CYGWIN, the undocumented - CMAKE_LEGACY_CYGWIN_WIN32mode for compatibility with CMake versions older than 2.8.4 has been removed.
Other Changes¶
- Language Standard Flags, such as - -std=c++11, when generated due to- target_compile_features()or- CMAKE_<LANG>_STANDARD, are now placed before flags added by- target_compile_options(), rather than after them.
- For all - COMPILE_DEFINITIONSproperties, any leading- -Don an item is removed whether or not it was specified by a generator expression.
- The - compile_commands.jsondatabase enabled by- CMAKE_EXPORT_COMPILE_COMMANDSnow provides the- outputfield in the compile commands objects. This allows multi-config generators, such as the- Ninja Multi-Configgenerator, to provide the compile commands for all configurations.
- The - USE_FOLDERSglobal property is treated as- ONby default. See policy- CMP0143.
- The top-level - project()call will now emit an author warning if the documented command order in relation to- cmake_minimum_required()is not respected.
- The - cmake --traceoption now follows- try_compile()and- try_run()invocations.
Updates¶
Changes made since CMake 3.26.0 include the following.
3.26.1, 3.26.2, 3.26.3, 3.26.4, 3.26.5¶
- These versions made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions. 
3.26.6¶
- The - cmake-file-api(7)"codemodel" version 2 "target" object- fileSetsfield was introduced by CMake 3.26.0 with entries of its- baseDirectoriesmember incorrectly expressed as absolute paths even if they are inside the top-level source directory. This has been fixed. Clients must be updated to expect relative paths under the top-level source directory.
