Changes made since CMake 3.26 include the following.
The Makefile and Ninja generators now support using the
--dependency-filelinker flag, added by GNU Binutils 2.35 and LLVM's LLD 12.0.0, so that files read by the linker will cause a relink if they change (typically modified timestamps). See the
The Visual Studio Generators for VS 14 (2015) and above learned to select the Windows SDK version explicitly using a
version=field in the
CMAKE_GENERATOR_PLATFORMvariable. See Visual Studio Platform Selection.
CXXlanguage now treats source file extensions
Apple text-based stubs (i.e.
.tbdfiles) may now be created for shared libraries on macOS. See the
add_custom_command()command gained a new
DEPENDS_EXPLICIT_ONLYoption to tell the Ninja Generators not to add any dependencies implied by the target to which it is attached. The
CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLYvariable was added to enable
DEPENDS_EXPLICIT_ONLYon all calls to
CMAKE_DLL_NAME_WITH_SOVERSIONvariable and associated
DLL_NAME_WITH_SOVERSIONtarget property were added to optionally append the
SOVERSIONto the filename of the
.dllpart of a shared library on Windows.
CMAKE_VS_DEBUGGER_WORKING_DIRECTORYwere added to initialize corresponding target properties.
SKIP_LINTINGsource file property was added to suppress target-wide code checks on specific sources.
FindCUDAToolkitmodule now provides an imported target for
cudla, and imported targets for CUPTI's
FindOpenGLmodule gained support for components
FindwxWidgetsmodule now provides an imported target.
COMPILE_ONLYgenerator expression was added to specify compilation usage requirements without any linking requirements.
TARGET_IMPORT_FILE_DIRgenerator expressions were added. These expand to details about the linker import file for a target.
INTERFACE_AUTOMOC_MACRO_NAMEStarget property was added to specify macro names for
mocas a transitive usage requirement.
CPack Inno Setup Generatorwas added to package using Inno Setup.
Compatibility with versions of CMake older than 3.5 is now deprecated and will be removed from a future version. Calls to
cmake_policy()that set the policy version to an older value now issue a deprecation diagnostic.
Visual Studio 9 2008generator is now deprecated and will be removed in a future version of CMake.
cmake --build $dir --verbosewill now print the working directory and command line used to perform the build.
configurestep no longer re-runs on every build when the
UPDATE_DISCONNECTEDoption is enabled. It will only re-run if details of the
patchsteps now always re-run if any of their details change, even if the
UPDATE_DISCONNECTEDoption is enabled. If using the
GITdownload method, and the
GIT_TAGis changed to a commit that is not already known locally, an error is now issued instead of silently using the previous
file(GET_RUNTIME_DEPENDENCIES)command now case-preserves DLL names reported on Windows. They are still converted to lowercase for filter matching.
SYSTEMtarget property is now honored for Apple Frameworks.
Changes made since CMake 3.27.0 include the following.
This version made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions.
Visual Studio Generators for VS 14 (2015) and above now prefer to select the latest Windows SDK, as documented by policy
CMP0149, when targeting any version of Windows. In CMake 3.27.[0-1] the preference was limited to targeting Windows 10 and above.
Visual Studio Generators for VS 14 (2015) and above now support using
CMAKE_GENERATOR_PLATFORMvariable to select the Windows 8.1 SDK. In CMake 3.27.[0-1] the
version=field was limited to selecting Windows 10 SDKs.
These versions made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions.
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 was fixed in CMake 3.26.6 and has now been fixed in 3.27.9. Clients must be updated to expect relative paths under the top-level source directory.
Fortran module dependency scanning in Ninja Generators was updated by CMake 3.27.0 to use exact collation dependencies. This was supposed to fix subtle rebuild failures when moving module sources among targets. Since then, several cases have been found in which exact collation dependencies were incorrectly computed when using Object Libraries. Some of these cases were incrementally fixed through the 3.27.x patch series, but additional more subtle cases have since been found. In order to avoid further churn in the 3.27 release series, the original change has been reverted and deferred to a future version of CMake.