CMake Changelog

What's new in CMake 3.29.2

Apr 12, 2024
  • This version made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions.

New in CMake 3.29.1 (Apr 6, 2024)

  • The CMAKE_LINKER_TYPE variable and corresponding LINKER_TYPE target property now work with compilers for the Swift language.

New in CMake 3.29.0 (Mar 25, 2024)

  • NEW FEATURES:
  • Command-Line:
  • cmake(1) -E cat can now print the standard input by passing the - argument.
  • Generators:
  • Visual Studio Generators now support selecting between the Intel oneAPI Fortran compiler (ifx) and the Intel classic Fortran compiler (ifort) using a fortran= field in CMAKE_GENERATOR_TOOLSET.
  • File-Based API:
  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.7.
  • The cmake-file-api(7) "codemodel" version 2 "target" object gained a new "launchers" field.
  • Compilers:
  • The LLVM/Clang GNU-like frontend on Windows (clang++) may now be used to compile CUDA language sources.
  • Compilers targeting the GNU ABI on Windows (MinGW) may now be used to compile Objective C (OBJC) and Objective C++ (OBJCXX). These include GNU compilers (gcc and g++) and the LLVM/Clang GNU-like frontends (clang and clang++).
  • TI Clang-based compilers are now supported with compiler id TIClang.
  • Commands:
  • The add_custom_command(TARGET) signature now supports adding build events through Alias Targets.
  • The cmake_language(EXIT) sub-command was added to terminate cmake -P scripts with a specified exit code.
  • The export(SETUP) sub-command was added to configure export sets. Its TARGET option's XCFRAMEWORK_LOCATION setting specifies the location of a .xcframework that can be substituted for an installed target.
  • The if() command gained new tests IS_READABLE, IS_WRITABLE and IS_EXECUTABLE to check file or directory permissions.
  • Variables:
  • The CMAKE_INSTALL_PREFIX environment variable was added to provide a default value for the CMAKE_INSTALL_PREFIX variable.
  • The CMAKE_LINKER_TYPE variable and corresponding LINKER_TYPE target property were added to specify what linker to use with some toolchains.
  • The CMAKE__COMPILER_LINKER, CMAKE__COMPILER_LINKER_ID, CMAKE__COMPILER_LINKER_VERSION and CMAKE__COMPILER_LINKER_FRONTEND_VARIANT variables were added to describe the linker used by the language's link step.
  • The CMAKE_PROJECT_INCLUDE, CMAKE_PROJECT_INCLUDE_BEFORE, CMAKE_PROJECT__INCLUDE, and CMAKE_PROJECT__INCLUDE_BEFORE variables learned to support a semicolon-separated list of CMake language files to be included sequentially. These variables can also reference module names to be found in CMAKE_MODULE_PATH or builtin to CMake.
  • The CMAKE_SKIP_TEST_ALL_DEPENDENCY variable was added to control whether the test (or RUN_TESTS) buildsystem target depends on the all (or ALL_BUILD) target.
  • A CMAKE_TEST_LAUNCHER variable and corresponding TEST_LAUNCHER target property were added to specify a launcher to be used by executable targets when invoked by tests added by the add_test() command.
  • Properties:
  • The CROSSCOMPILING_EMULATOR target property now supports generator expressions.
  • The UNITY_BUILD target property now supports the Objective C (OBJC) and Objective C++ (OBJCXX) languages.
  • The XCODE_EMBED_XPC_SERVICES target property was added to tell the Xcode generator what targets to put in the Embed XPC Resources build phase.
  • Modules:
  • The CMakePackageConfigHelpers module gained new generate_apple_platform_selection_file() and generate_apple_architecture_selection_file() functions, which can be used to generate a file that includes another Apple-platform-specific file or the includes an architecture-specific implementation of a package for an Apple platform, respectively.
  • The FindOpenGL module learned to find a GLU include directory different than the GL include directory. A new OPENGL_INCLUDE_DIRS result variable provides all include directories.
  • CTest:
  • ctest(1) gained a --http-header option to add custom headers on submission to CDash.
  • ctest(1) gained the --tests-from-file and --exclude-from-file options to run or exclude tests named in a file.
  • ctest(1) now supports job server integration on POSIX systems.
  • The ctest -j option may now be given without a value to let ctest choose a default level of parallelism, or with 0 to let ctest use unbounded parallelism. The corresponding CTEST_PARALLEL_LEVEL environment variable, if set to the empty string, is now equivalent to passing -j with no value.
  • The ctest_test() command gained options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE to run or exclude tests named in a file.
  • CPack:
  • The CPack DEB Generator CPACK_DEBIAN_FILE_NAME variable may now be set without any suffix, and the .deb suffix will be added automatically.
  • The CPack RPM Generator CPACK_RPM_FILE_NAME variable may now be set without any suffix, and the .rpm suffix will be added automatically.
  • The CPack WIX Generator gained a new variable, CPACK_WIX_INSTALL_SCOPE, to control the InstallScope property of WiX MSI installers.
  • OTHER CHANGES:
  • CMake learned to de-duplicate libraries on link lines based on linker capabilities. See policy CMP0156.
  • The add_test() command now honors CMAKE_CROSSCOMPILING_EMULATOR only when cross-compiling. See policy CMP0158.
  • On Windows, when targeting the MSVC ABI, the find_library() command now accepts .a file names after first considering .lib. This is symmetric with existing behavior when targeting the GNU ABI, in which the command accepts .lib file names after first considering .a.
  • On Windows, when targeting the MSVC ABI, the find_library() command now considers .dll.lib file names before .lib. This is the default suffix for DLL import libraries created by Rust toolchains for the MSVC ABI.
  • The Ninja and NMake Makefiles generators now use the -external:I flag for system includes when using IntelLLVM as of version 2021.4. The -external:W0 flag is also used as of version 2022.2.
  • The create_test_sourcelist() command now provides a full path to the generated driver source file.
  • The CPACK_PRODUCTBUILD_DOMAINS variable now defaults to true. See policy CMP0161.
  • The CPack WIX Generator now produces WiX MSI installers that create start menu and uninstall entries for all users by default, as documented by the CPACK_WIX_INSTALL_SCOPE variable perMachine value. Previously, without a custom WiX template, it produced installers that would only create start menu and uninstall entries for the current user, even though they install for all users.

New in CMake 3.28.4 (Mar 20, 2024)

  • NEW FEATURES:
  • Languages:
  • C++ 20 named modules are now supported by Ninja Generators and Visual Studio Generators for VS 2022 and newer, in combination with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang 16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer. See cmake-cxxmodules(7) for details.
  • HIP language code may now be compiled for NVIDIA GPUs using the NVIDIA CUDA Compiler (NVCC). See the CMAKE_HIP_PLATFORM variable.
  • Platforms:
  • On Apple platforms, .xcframework folders are now supported:
  • The find_library() command now finds .xcframework folders.
  • The target_link_libraries() command now supports linking against a .xcframework folder.
  • The IMPORTED_LOCATION target property of an imported library target may now be the path to a .xcframework folder.
  • Apple visionOS and its xros and xrsimulator SDKs are now supported. Compiling for Apple visionOS can be requested by setting CMAKE_SYSTEM_NAME to visionOS. See Cross Compiling for iOS, tvOS, visionOS, or watchOS for more information.
  • Presets:
  • cmake-presets(7) files now support schema version 8. It adds support for a $schema field.
  • Compilers:
  • Cray Clang-based compilers are now supported with compiler id CrayClang.
  • The OrangeC compiler is now supported with compiler id OrangeC.
  • Commands:
  • The add_custom_command() and add_custom_target() commands gained a JOB_SERVER_AWARE option.
  • The cmake_host_system_information() command gained a MSYSTEM_PREFIX query for the installation prefix of a MSYS or MinGW development environment on Windows hosts.
  • The set_property() command TEST mode gained a DIRECTORY option to set properties on tests in other directories.
  • The set_tests_properties() command gained a DIRECTORY option to set properties on tests in other directories.
  • The get_property() command TEST mode gained a DIRECTORY option to get properties on tests in other directories.
  • The get_test_property() command gained a DIRECTORY option to get properties on tests in other directories.
  • Variables:
  • The CMAKE_CROSSCOMPILING_EMULATOR environment variable was added to initialize the CMAKE_CROSSCOMPILING_EMULATOR cache variable.
  • The CMAKE_HIP_PLATFORM variable was added to specify the GPU platform for which HIP language sources are to be compiled (amd or nvidia).
  • Properties:
  • On imported shared libraries, the IMPORTED_IMPLIB target property may now be used without IMPORTED_LOCATION. This can be used to represent a stub library whose location should not be added as a runtime search path to dependents that link it.
  • The IMPORTED_LOCATION property of a macOS framework may now be a path to the .framework folder itself.
  • The XCODE_EMBED_RESOURCES target property was added to tell the Xcode generator what targets to put in the Embed Resources build phase.
  • Modules:
  • The ExternalProject module now includes the BUILD_JOB_SERVER_AWARE option for the ExternalProject_Add() command. This option enables the integration of the GNU Make job server when using an explicit BUILD_COMMAND with certain Makefile Generators. Additionally, the ExternalProject_Add_Step() command has been updated to support the new JOB_SERVER_AWARE option.
  • The FetchContent module's FetchContent_Declare() command gained an EXCLUDE_FROM_ALL option, which propagates through to the add_subdirectory() call made by FetchContent_MakeAvailable() for the dependency.
  • The FindCURL module gained a CURL_USE_STATIC_LIBS hint to select static libraries.
  • The FindEXPAT module gained an EXPAT_USE_STATIC_LIBS hint to select static libraries.
  • The FindPkgConfig module pkg_get_variable() command gained a DEFINE_VARIABLES option to pass variables to pkg-config.
  • Generator Expressions:
  • The generator expressions $, $, and $ short-circuit to avoid unnecessary evaluation of parameters.
  • CTest:
  • CTest may now take a dynamically-generated resource spec file, which can be specified by the GENERATED_RESOURCE_SPEC_FILE test property.
  • Deprecated and Removed Features:
  • The exec_program() command, which has been deprecated since CMake 3.0, has been removed by policy CMP0153. Use the execute_process() command instead.
  • The Visual Studio 11 2012 generator has been removed.
  • The Visual Studio 12 2013 generator is now deprecated and will be removed in a future version of CMake.
  • The IOS_INSTALL_COMBINED target property and corresponding CMAKE_IOS_INSTALL_COMBINED variable have been deprecated. Their functionality does not make sense on Apple Silicon hosts.
  • The Xcode generator will now issue a fatal error if the Legacy Build System has been selected for Xcode 14 and newer. Those Xcode versions dropped support for the Legacy Build System and expect the project to be set-up for their current Build System.
  • OTHER CHANGES:
  • Generated files, in targets using File Sets, are now considered private by default. Generated public headers must be specified using file sets. This allows Ninja Generators to produce more efficient build graphs. See policy CMP0154.
  • The find_library(), find_path(), and find_file() commands no longer search in installation prefixes derived from the PATH environment variable. This behavior was added in CMake 3.3 to support MSYS and MinGW (MSYSTEM) development environments on Windows, but it can search undesired prefixes that happen to be in the PATH for unrelated reasons. Users who keep some /bin directories in the PATH just for their tools do not necessarily want any corresponding /lib or /include directories searched. The behavior was reverted for non-Windows platforms by CMake 3.6. Now it has been reverted on Windows platforms too.
  • One may set the CMAKE_PREFIX_PATH environment variable with a semicolon-separated list of prefixes that are to be searched.
  • When using MinGW tools in a MSYSTEM environment on Windows, the $MSYSTEM_PREFIX/local and $MSYSTEM_PREFIX prefixes are now added to CMAKE_SYSTEM_PREFIX_PATH.
  • The precompiled Linux x86_64 binaries provided on cmake.org now require GLIBC 2.17 or higher.
  • Updates:
  • Changes made since CMake 3.28.0 include the following.
  • 3.28.1, 3.28.2, 3.28.3
  • These versions made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions.

New in CMake 3.29.0 RC 4 (Mar 15, 2024)

  • NEW FEATURES:
  • Command-Line:
  • cmake(1) -E cat can now print the standard input by passing the - argument.
  • Generators:
  • Visual Studio Generators now support selecting between the Intel oneAPI Fortran compiler (ifx) and the Intel classic Fortran compiler (ifort) using a fortran= field in CMAKE_GENERATOR_TOOLSET.
  • File-Based API:
  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.7.
  • The cmake-file-api(7) "codemodel" version 2 "target" object gained a new "launchers" field.
  • Compilers:
  • The LLVM/Clang GNU-like frontend on Windows (clang++) may now be used to compile CUDA language sources.
  • Compilers targeting the GNU ABI on Windows (MinGW) may now be used to compile Objective C (OBJC) and Objective C++ (OBJCXX). These include GNU compilers (gcc and g++) and the LLVM/Clang GNU-like frontends (clang and clang++).
  • TI Clang-based compilers are now supported with compiler id TIClang.
  • Commands:
  • The add_custom_command(TARGET) signature now supports adding build events through Alias Targets.
  • The cmake_language(EXIT) sub-command was added to terminate cmake -P scripts with a specified exit code.
  • The export(SETUP) sub-command was added to configure export sets. Its TARGET option's XCFRAMEWORK_LOCATION setting specifies the location of a .xcframework that can be substituted for an installed target.
  • The if() command gained new tests IS_READABLE, IS_WRITABLE and IS_EXECUTABLE to check file or directory permissions.
  • Variables:
  • The CMAKE_INSTALL_PREFIX environment variable was added to provide a default value for the CMAKE_INSTALL_PREFIX variable.
  • The CMAKE_LINKER_TYPE variable and corresponding LINKER_TYPE target property were added to specify what linker to use with some toolchains.
  • The CMAKE__COMPILER_LINKER, CMAKE__COMPILER_LINKER_ID, CMAKE__COMPILER_LINKER_VERSION and CMAKE__COMPILER_LINKER_FRONTEND_VARIANT variables were added to describe the linker used by the language's link step.
  • The CMAKE_PROJECT_INCLUDE, CMAKE_PROJECT_INCLUDE_BEFORE, CMAKE_PROJECT__INCLUDE, and CMAKE_PROJECT__INCLUDE_BEFORE variables learned to support a semicolon-separated list of CMake language files to be included sequentially. These variables can also reference module names to be found in CMAKE_MODULE_PATH or builtin to CMake.
  • The CMAKE_SKIP_TEST_ALL_DEPENDENCY variable was added to control whether the test (or RUN_TESTS) buildsystem target depends on the all (or ALL_BUILD) target.
  • A CMAKE_TEST_LAUNCHER variable and corresponding TEST_LAUNCHER target property were added to specify a launcher to be used by executable targets when invoked by tests added by the add_test() command.
  • Properties:
  • The CROSSCOMPILING_EMULATOR target property now supports generator expressions.
  • The UNITY_BUILD target property now supports the Objective C (OBJC) and Objective C++ (OBJCXX) languages.
  • The XCODE_EMBED_XPC_SERVICES target property was added to tell the Xcode generator what targets to put in the Embed XPC Resources build phase.
  • Modules:
  • The CMakePackageConfigHelpers module gained new generate_apple_platform_selection_file() and generate_apple_architecture_selection_file() functions, which can be used to generate a file that includes another Apple-platform-specific file or the includes an architecture-specific implementation of a package for an Apple platform, respectively.
  • The FindOpenGL module learned to find a GLU include directory different than the GL include directory. A new OPENGL_INCLUDE_DIRS result variable provides all include directories.
  • CTest:
  • ctest(1) gained a --http-header option to add custom headers on submission to CDash.
  • ctest(1) gained the --tests-from-file and --exclude-from-file options to run or exclude tests named in a file.
  • ctest(1) now supports job server integration on POSIX systems.
  • The ctest -j option may now be given without a value to let ctest choose a default level of parallelism, or with 0 to let ctest use unbounded parallelism. The corresponding CTEST_PARALLEL_LEVEL environment variable, if set to the empty string, is now equivalent to passing -j with no value.
  • The ctest_test() command gained options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE to run or exclude tests named in a file.
  • CPack:
  • The CPack DEB Generator CPACK_DEBIAN_FILE_NAME variable may now be set without any suffix, and the .deb suffix will be added automatically.
  • The CPack RPM Generator CPACK_RPM_FILE_NAME variable may now be set without any suffix, and the .rpm suffix will be added automatically.
  • The CPack WIX Generator gained a new variable, CPACK_WIX_INSTALL_SCOPE, to control the InstallScope property of WiX MSI installers.
  • Other Changes:
  • CMake learned to de-duplicate libraries on link lines based on linker capabilities. See policy CMP0156.
  • The add_test() command now honors CMAKE_CROSSCOMPILING_EMULATOR only when cross-compiling. See policy CMP0158.
  • On Windows, when targeting the MSVC ABI, the find_library() command now accepts .a file names after first considering .lib. This is symmetric with existing behavior when targeting the GNU ABI, in which the command accepts .lib file names after first considering .a.
  • On Windows, when targeting the MSVC ABI, the find_library() command now considers .dll.lib file names before .lib. This is the default suffix for DLL import libraries created by Rust toolchains for the MSVC ABI.
  • The Ninja and NMake Makefiles generators now use the -external:I flag for system includes when using IntelLLVM as of version 2021.4. The -external:W0 flag is also used as of version 2022.2.
  • The create_test_sourcelist() command now provides a full path to the generated driver source file.
  • The CPACK_PRODUCTBUILD_DOMAINS variable now defaults to true. See policy CMP0161.
  • The CPack WIX Generator now produces WiX MSI installers that create start menu and uninstall entries for all users by default, as documented by the CPACK_WIX_INSTALL_SCOPE variable perMachine value. Previously, without a custom WiX template, it produced installers that would only create start menu and uninstall entries for the current user, even though they install for all users.

New in CMake 3.29.0 RC 1 (Feb 20, 2024)

  • NEW FEATURES:
  • Command-Line:
  • cmake(1) -E cat can now print the standard input by passing the - argument.
  • Generators:
  • Visual Studio Generators now support selecting between the Intel oneAPI Fortran compiler (ifx) and the Intel classic Fortran compiler (ifort) using a fortran= field in CMAKE_GENERATOR_TOOLSET.
  • File-Based API:
  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.7.
  • The cmake-file-api(7) "codemodel" version 2 "target" object gained a new "launchers" field.
  • Compilers:
  • The LLVM/Clang GNU-like frontend on Windows (clang++) may now be used to compile CUDA language sources.
  • Compilers targeting the GNU ABI on Windows (MinGW) may now be used to compile Objective C (OBJC) and Objective C++ (OBJCXX). These include GNU compilers (gcc and g++) and the LLVM/Clang GNU-like frontends (clang and clang++).
  • TI Clang-based compilers are now supported with compiler id TIClang.
  • Commands:
  • The add_custom_command(TARGET) signature now supports adding build events through Alias Targets.
  • The cmake_language(EXIT) sub-command was added to terminate cmake -P scripts with a specified exit code.
  • The export(SETUP) sub-command was added to configure export sets. Its PACKAGE_DEPENDENCY option configures how find_dependency() calls are exported. Its TARGET option's XCFRAMEWORK_LOCATION setting specifies the location of a .xcframework that can be substituted for an installed target.
  • The if() command gained new tests IS_READABLE, IS_WRITABLE and IS_EXECUTABLE to check file or directory permissions.
  • install(EXPORT) and export(EXPORT) learned a new EXPORT_PACKAGE_DEPENDENCIES argument, which can be used to generate find_dependency() calls based on what targets the exported targets depend on.
  • Variables:
  • The CMAKE_INSTALL_PREFIX environment variable was added to provide a default value for the CMAKE_INSTALL_PREFIX variable.
  • The CMAKE_LINKER_TYPE variable and corresponding LINKER_TYPE target property were added to specify what linker to use with some toolchains.
  • The CMAKE__COMPILER_LINKER, CMAKE__COMPILER_LINKER_ID, CMAKE__COMPILER_LINKER_VERSION and CMAKE__COMPILER_LINKER_FRONTEND_VARIANT variables were added to describe the linker used by the language's link step.
  • The CMAKE_PROJECT_INCLUDE, CMAKE_PROJECT_INCLUDE_BEFORE, CMAKE_PROJECT__INCLUDE, and CMAKE_PROJECT__INCLUDE_BEFORE variables learned to support a semicolon-separated list of CMake language files to be included sequentially. These variables can also reference module names to be found in CMAKE_MODULE_PATH or builtin to CMake.
  • The CMAKE_SKIP_TEST_ALL_DEPENDENCY variable was added to control whether the test (or RUN_TESTS) buildsystem target depends on the all (or ALL_BUILD) target.
  • A CMAKE_TEST_LAUNCHER variable and corresponding TEST_LAUNCHER target property were added to specify a launcher to be used by executable targets when invoked by tests added by the add_test() command.
  • Properties:
  • The CROSSCOMPILING_EMULATOR target property now supports generator expressions.
  • The EXPORT_FIND_PACKAGE_NAME target property was added to allow targets to specify what package name to pass when exporting find_dependency() calls. This property is initialized with a new CMAKE_EXPORT_FIND_PACKAGE_NAME variable.
  • The UNITY_BUILD target property now supports the Objective C (OBJC) and Objective C++ (OBJCXX) languages.
  • The XCODE_EMBED_XPC_SERVICES target property was added to tell the Xcode generator what targets to put in the Embed XPC Resources build phase.
  • Modules:
  • The CMakePackageConfigHelpers module gained new generate_apple_platform_selection_file() and generate_apple_architecture_selection_file() functions, which can be used to generate a file that includes another Apple-platform-specific file or the includes an architecture-specific implementation of a package for an Apple platform, respectively.
  • The FindOpenGL module learned to find a GLU include directory different than the GL include directory. A new OPENGL_INCLUDE_DIRS result variable provides all include directories.
  • CTest:
  • ctest(1) gained a --http-header option to add custom headers on submission to CDash.
  • ctest(1) gained the --tests-from-file and --exclude-from-file options to run or exclude tests named in a file.
  • ctest(1) now supports job server integration on POSIX systems.
  • The ctest_test() command gained options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE to run or exclude tests named in a file.
  • CPack:
  • The CPack DEB Generator CPACK_DEBIAN_FILE_NAME variable may now be set without any suffix, and the .deb suffix will be added automatically.
  • The CPack RPM Generator CPACK_RPM_FILE_NAME variable may now be set without any suffix, and the .rpm suffix will be added automatically.
  • The CPack WIX Generator gained a new variable, CPACK_WIX_INSTALL_SCOPE, to control the InstallScope property of WiX MSI installers.
  • OTHER CHANGES:
  • CMake learned to de-duplicate libraries on link lines based on linker capabilities. See policy CMP0156.
  • The add_test() command now honors CMAKE_CROSSCOMPILING_EMULATOR only when cross-compiling. See policy CMP0158.
  • FetchContent_MakeAvailable() now sets the CMAKE_EXPORT_FIND_PACKAGE_NAME variable for CMake projects.
  • On Windows, when targeting the MSVC ABI, the find_library() command now accepts .a file names after first considering .lib. This is symmetric with existing behavior when targeting the GNU ABI, in which the command accepts .lib file names after first considering .a.
  • On Windows, when targeting the MSVC ABI, the find_library() command now considers .dll.lib file names before .lib. This is the default suffix for DLL import libraries created by Rust toolchains for the MSVC ABI.
  • The Ninja and NMake Makefiles generators now use the -external:I flag for system includes when using IntelLLVM as of version 2021.4. The -external:W0 flag is also used as of version 2022.2.
  • The create_test_sourcelist() command now provides a full path to the generated driver source file.
  • The CPACK_PRODUCTBUILD_DOMAINS variable now defaults to true. See policy CMP0161.
  • The CPack WIX Generator now produces WiX MSI installers that create start menu and uninstall entries for all users by default, as documented by the CPACK_WIX_INSTALL_SCOPE variable perMachine value. Previously, without a custom WiX template, it produced installers that would only create start menu and uninstall entries for the current user, even though they install for all users.

New in CMake 3.28.3 (Feb 5, 2024)

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

New in CMake 3.28.2 (Jan 31, 2024)

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

New in CMake 3.28.1 (Dec 15, 2023)

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

New in CMake 3.28.0 (Dec 9, 2023)

  • NEW FEATURES:
  • Languages:
  • C++ 20 named modules are now supported by Ninja Generators and Visual Studio Generators for VS 2022 and newer, in combination with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang 16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer. See cmake-cxxmodules(7) for details.
  • HIP language code may now be compiled for NVIDIA GPUs using the NVIDIA CUDA Compiler (NVCC). See the CMAKE_HIP_PLATFORM variable.
  • Platforms:
  • On Apple platforms, .xcframework folders are now supported:
  • The find_library() command now finds .xcframework folders.
  • The target_link_libraries() command now supports linking against a .xcframework folder.
  • The IMPORTED_LOCATION target property of an imported library target may now be the path to a .xcframework folder.
  • Apple visionOS and its xros and xrsimulator SDKs are now supported. Compiling for Apple visionOS can be requested by setting CMAKE_SYSTEM_NAME to visionOS. See Cross Compiling for iOS, tvOS, visionOS, or watchOS for more information.
  • Presets:
  • cmake-presets(7) files now support schema version 8. It adds support for a $schema field.
  • Compilers:
  • Cray Clang-based compilers are now supported with compiler id CrayClang.
  • The OrangeC compiler is now supported with compiler id OrangeC.
  • Commands:
  • The add_custom_command() and add_custom_target() commands gained a JOB_SERVER_AWARE option.
  • The cmake_host_system_information() command gained a MSYSTEM_PREFIX query for the installation prefix of a MSYS or MinGW development environment on Windows hosts.
  • The set_property() command TEST mode gained a DIRECTORY option to set properties on tests in other directories.
  • The set_tests_properties() command gained a DIRECTORY option to set properties on tests in other directories.
  • The get_property() command TEST mode gained a DIRECTORY option to get properties on tests in other directories.
  • The get_test_property() command gained a DIRECTORY option to get properties on tests in other directories.
  • VARIABLES:
  • The CMAKE_CROSSCOMPILING_EMULATOR environment variable was added to initialize the CMAKE_CROSSCOMPILING_EMULATOR cache variable.
  • The CMAKE_HIP_PLATFORM variable was added to specify the GPU platform for which HIP language sources are to be compiled (amd or nvidia).
  • Properties:
  • On imported shared libraries, the IMPORTED_IMPLIB target property may now be used without IMPORTED_LOCATION. This can be used to represent a stub library whose location should not be added as a runtime search path to dependents that link it.
  • The IMPORTED_LOCATION property of a macOS framework may now be a path to the .framework folder itself.
  • The XCODE_EMBED_RESOURCES target property was added to tell the Xcode generator what targets to put in the Embed Resources build phase.
  • Modules:
  • The ExternalProject module now includes the BUILD_JOB_SERVER_AWARE option for the ExternalProject_Add() command. This option enables the integration of the GNU Make job server when using an explicit BUILD_COMMAND with certain Makefile Generators. Additionally, the ExternalProject_Add_Step() command has been updated to support the new JOB_SERVER_AWARE option.
  • The ExternalProject module now declares BYPRODUCTS for the downloaded file for generated download steps. Previously, if multiple external projects downloaded to the same file, hash verification could fail. Now, when using the Ninja Generators, this scenario is detected and Ninja will raise an error stating that multiple rules generate the same file.
  • The FetchContent module's FetchContent_Declare() command gained an EXCLUDE_FROM_ALL option, which propagates through to the add_subdirectory() call made by FetchContent_MakeAvailable() for the dependency.
  • The FindCURL module gained a CURL_USE_STATIC_LIBS hint to select static libraries.
  • The FindEXPAT module gained an EXPAT_USE_STATIC_LIBS hint to select static libraries.
  • The FindPkgConfig module pkg_get_variable() command gained a DEFINE_VARIABLES option to pass variables to pkg-config.
  • Generator Expressions:
  • The generator expressions $, $, and $ short-circuit to avoid unnecessary evaluation of parameters.
  • CTest:
  • CTest may now take a dynamically-generated resource spec file, which can be specified by the GENERATED_RESOURCE_SPEC_FILE test property.
  • Deprecated and Removed Features:
  • The exec_program() command, which has been deprecated since CMake 3.0, has been removed by policy CMP0153. Use the execute_process() command instead.
  • The Visual Studio 11 2012 generator has been removed.
  • The Visual Studio 12 2013 generator is now deprecated and will be removed in a future version of CMake.
  • The IOS_INSTALL_COMBINED target property and corresponding CMAKE_IOS_INSTALL_COMBINED variable have been deprecated. Their functionality does not make sense on Apple Silicon hosts.
  • The Xcode generator will now issue a fatal error if the Legacy Build System has been selected for Xcode 14 and newer. Those Xcode versions dropped support for the Legacy Build System and expect the project to be set-up for their current Build System.
  • OTHER CHANGES:
  • Generated files, in targets using File Sets, are now considered private by default. Generated public headers must be specified using file sets. This allows Ninja Generators to produce more efficient build graphs. See policy CMP0154.
  • The find_library(), find_path(), and find_file() commands no longer search in installation prefixes derived from the PATH environment variable. This behavior was added in CMake 3.3 to support MSYS and MinGW (MSYSTEM) development environments on Windows, but it can search undesired prefixes that happen to be in the PATH for unrelated reasons. Users who keep some /bin directories in the PATH just for their tools do not necessarily want any corresponding /lib or /include directories searched. The behavior was reverted for non-Windows platforms by CMake 3.6. Now it has been reverted on Windows platforms too.
  • One may set the CMAKE_PREFIX_PATH environment variable with a semicolon-separated list of prefixes that are to be searched.
  • When using MinGW tools in a MSYSTEM environment on Windows, the $MSYSTEM_PREFIX/local and $MSYSTEM_PREFIX prefixes are now added to CMAKE_SYSTEM_PREFIX_PATH.
  • The precompiled Linux x86_64 binaries provided on cmake.org now require GLIBC 2.17 or higher.

New in CMake 3.27.9 (Dec 2, 2023)

  • The cmake-file-api(7) "codemodel" version 2 "target" object fileSets field was introduced by CMake 3.26.0 with entries of its baseDirectories member 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.

New in CMake 3.27.8 (Nov 18, 2023)

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

New in CMake 3.27.7 (Oct 7, 2023)

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

New in CMake 3.27.6 (Sep 23, 2023)

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

New in CMake 3.27.5 (Sep 17, 2023)

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

New in CMake 3.27.4 (Aug 25, 2023)

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

New in CMake 3.27.3 (Aug 18, 2023)

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

New in CMake 3.27.2 (Aug 10, 2023)

  • 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 version=8.1 in the CMAKE_GENERATOR_PLATFORM variable to select the Windows 8.1 SDK. In CMake 3.27.[0-1] the version= field was limited to selecting Windows 10 SDKs.

New in CMake 3.27.1 (Aug 10, 2023)

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

New in CMake 3.27.0 (Jul 18, 2023)

  • NEW FEATURES:
  • Debugger:
  • cmake(1) now supports interactive debugging of the CMake language. See the --debugger option.
  • Presets:
  • cmake-presets(7) files now support schema version 7.
  • cmake-presets(7) now supports $penv{} macro expansion in include fields.
  • Generators:
  • The Makefile and Ninja generators now support using the --dependency-file linker 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 CMAKE_LINK_DEPENDS_USE_LINKER variable.
  • The Visual Studio Generators for VS 2015 and above learned to select the Windows SDK version explicitly using a version= field in the CMAKE_GENERATOR_PLATFORM variable. See Visual Studio Platform Selection.
  • Languages:
  • The CXX language now treats source file extensions .ccm, .cxxm, and .c++m as C++.
  • File-Based API:
  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.6.
  • The cmake-file-api(7) "codemodel" version 2 "target" object gained a new "frameworks" field in the "compileGroups" objects.
  • Platforms:
  • Apple text-based stubs (i.e. .tbd files) may now be created for shared libraries on macOS. See the ENABLE_EXPORTS property.
  • Commands:
  • The add_custom_command() command gained a new DEPENDS_EXPLICIT_ONLY option 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_ONLY variable was added to enable DEPENDS_EXPLICIT_ONLY on all calls to add_custom_command() command.
  • The cmake_file_api() command was added for projects to add CMake file API queries for the current CMake run.
  • The find_package() command now searches prefixes specified by upper-case _ROOT CMake variables and upper-case _ROOT environment variables. See policy CMP0144.
  • The install(CODE) and install(SCRIPT) commands now support the $ generator expression.
  • Variables:
  • The CMAKE_DLL_NAME_WITH_SOVERSION variable and associated DLL_NAME_WITH_SOVERSION target property were added to optionally append the SOVERSION to the filename of the .dll part of a shared library on Windows.
  • Variables CMAKE_VS_DEBUGGER_COMMAND, CMAKE_VS_DEBUGGER_COMMAND_ARGUMENTS, CMAKE_VS_DEBUGGER_ENVIRONMENT, and CMAKE_VS_DEBUGGER_WORKING_DIRECTORY were added to initialize corresponding target properties.
  • The CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable was added to initialize the VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION target property on all targets when they are created.
  • Properties:
  • A CUDA_CUBIN_COMPILATION target property was added to Object Libraries to support compiling to .cubin files instead of host object files. Currently only supported with NVIDIA.
  • A CUDA_FATBIN_COMPILATION target property was added to Object Libraries to support compiling to .fatbin files instead of host object files. Currently only supported with NVIDIA.
  • A CUDA_OPTIX_COMPILATION target property was added to Object Libraries to support compiling to .optixir files instead of host object files. Currently only supported with NVIDIA.
  • The _CLANG_TIDY, _CPPCHECK, _CPPLINT, and _INCLUDE_WHAT_YOU_USE, target properties now support generator expressions.
  • The _LINKER_LAUNCHER target property now supports generator expressions.
  • The SKIP_LINTING source file property was added to suppress target-wide code checks on specific sources.
  • Modules:
  • The FindCUDAToolkit module now provides an imported target for cudla, and imported targets for CUPTI's nvperf and pcsampling components.
  • The FindDoxygen module's doxygen_add_docs() command gained a CONFIG_FILE option to specify a custom doxygen configuration file.
  • The FindOpenGL module gained support for components GLES2 and GLES3.
  • The FindwxWidgets module now provides an imported target.
  • Generator Expressions:
  • The COMPILE_ONLY generator expression was added to specify compilation usage requirements without any linking requirements.
  • $ generator expressions were added for query, transformation, and ordering operations on lists.
  • $ generator expressions for decomposition and transformation operations learned to process lists of paths element-wise.
  • The TARGET_IMPORT_FILE, TARGET_IMPORT_FILE_BASE_NAME, TARGET_IMPORT_FILE_PREFIX, TARGET_IMPORT_FILE_SUFFIX, TARGET_IMPORT_FILE_NAME, and TARGET_IMPORT_FILE_DIR generator expressions were added. These expand to details about the linker import file for a target.
  • The TARGET_RUNTIME_DLL_DIRS generator expression was added. It expands to a list of the directories containing DLLs in TARGET_RUNTIME_DLLS.
  • Autogen:
  • The CMAKE_AUTOMOC_EXECUTABLE, CMAKE_AUTORCC_EXECUTABLE, and CMAKE_AUTOUIC_EXECUTABLE variables were added to initialize the corresponding target properties as targets are created.
  • The AUTOGEN_USE_SYSTEM_INCLUDE target property and corresponding CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE variable were added to explicitly control whether autogen headers are considered system headers.
  • The INTERFACE_AUTOMOC_MACRO_NAMES target property was added to specify macro names for moc as a transitive usage requirement.
  • CTest:
  • The TIMEOUT_SIGNAL_NAME and TIMEOUT_SIGNAL_GRACE_PERIOD test properties were added to specify a POSIX signal to send to a test process when its timeout is reached.
  • CPack:
  • The CPack Inno Setup Generator was added to package using Inno Setup.
  • Deprecated and Removed Features:
  • Compatibility with versions of CMake older than 3.5 is now deprecated and will be removed from a future version. Calls to cmake_minimum_required() or cmake_policy() that set the policy version to an older value now issue a deprecation diagnostic.
  • The Extra Generators have been deprecated. IDEs may use the cmake-file-api(7) to view CMake-generated project build trees.
  • The FindCUDA module, which has been deprecated since CMake 3.10, has been removed by policy CMP0146. Port projects to CMake's first-class CUDA language support.
  • The FindPythonInterp and FindPythonLibs modules, which have been deprecated since CMake 3.12, have been removed by policy CMP0148. Port projects to FindPython3, FindPython2, or FindPython.
  • The Dart and FindDart modules have been deprecated via policy CMP0145. Port projects to the CTest module.
  • The Visual Studio 9 2008 generator is now deprecated and will be removed in a future version of CMake.
  • Other Changes:
  • cmake --build $dir --verbose will now print the working directory and command line used to perform the build.
  • The ExternalProject and FetchContent modules now resolve relative GIT_REPOSITORY paths as relative to the parent project's remote, not as a relative local file system path. See CMP0150.
  • The ExternalProject configure step no longer re-runs on every build when the UPDATE_DISCONNECTED option is enabled. It will only re-run if details of the download, update, or patch step change.
  • The ExternalProject update and patch steps now always re-run if any of their details change, even if the UPDATE_DISCONNECTED option is enabled. If using the GIT download method, and the GIT_TAG is changed to a commit that is not already known locally, an error is now issued instead of silently using the previous GIT_TAG.
  • The FindPython, FindPython2 and FindPython3 modules now support the Windows ARM64 platform.
  • The file(GET_RUNTIME_DEPENDENCIES) command now case-preserves DLL names reported on Windows. They are still converted to lowercase for filter matching.
  • The SYSTEM target property is now honored for Apple Frameworks.
  • Visual Studio Generators, for VS 15.8 (2017) and newer, now build custom commands in parallel. See policy CMP0147.

New in CMake 3.26.4 (May 19, 2023)

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

New in CMake 3.26.3 (Apr 6, 2023)

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

New in CMake 3.26.2 (Apr 2, 2023)

  • PGP sig by 2D2CEF1034921684

New in CMake 3.26.1 (Mar 24, 2023)

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

New in CMake 3.26.0 (Mar 19, 2023)

  • LANGUAGES:
  • The ASM_MARMASM language was added to support the Microsoft ARM assembler language.
  • COMMAND-LINE:
  • The cmake -E copy command-line tool now supports a -t argument.
  • The cmake -E copy_directory_if_different command-line tool was added.
  • CONFIGURE LOG:
  • CMake now writes a YAML log of configure-time checks to CMakeFiles/CMakeConfigureLog.yaml under the top of the build tree. See the cmake-configure-log(7) manual.
  • FILE-BASED API:
  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.5.
  • The cmake-file-api(7) "codemodel" version 2 "target" object gained a new fileSets field and associated fileSetIndex field to sources objects.
  • 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 expressions in their COMMENT option.
  • The message() command gained a CONFIGURE_LOG mode to record an entry in the cmake-configure-log(7).
  • The string(TIMESTAMP) and file(TIMESTAMP) commands now support the %z and %Z specifiers for the time zone.
  • The try_compile() and try_run() commands gained a LOG_DESCRIPTION option specifying text to be recorded in the cmake-configure-log(7).
  • The try_compile() and try_run() commands gained a NO_LOG option to skip recording a cmake-configure-log(7) entry.
  • VARIABLES:
  • The CMAKE__COMPILER_FRONTEND_VARIANT variable is now set for GNU, MSVC, and AppleClang compilers that have only one frontend variant.
  • A CMAKE_VS_VERSION_BUILD_NUMBER variable is now set by Visual Studio Generators for VS 2017 and above to report the four-component Visual Studio version number.
  • PROPERTIES:
  • The _CLANG_TIDY_EXPORT_FIXES_DIR target property was added to allow the clang-tidy tool to export its suggested fixes to a set of .yaml files. A new CMAKE__CLANG_TIDY_EXPORT_FIXES_DIR variable was created to initialize this property.
  • The XCODE_EMBED_EXTENSIONKIT_EXTENSIONS target property was added to tell the Xcode generator to embed ExtensionKit-based extensions such as extensions using the Background Assets framework. Aspects of the embedding can be customized with:
  • XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_PATH
  • XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_CODE_SIGN_ON_COPY
  • XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_REMOVE_HEADERS_ON_COPY
  • MODULES:
  • The ExternalProject module's ExternalProject_Add() command gained an INSTALL_BYPRODUCTS option to specify files generated by the install step.
  • The FindCUDAToolkit module:
  • gained support for the sbsa-linux cross compilation target, and
  • now provides an imported target for nvrtc_static, if found.
  • The FindImageMagick module now provides imported targets.
  • The FindPython3 and FindPython modules gained support for the Stable Application Binary Interface.
  • The UseSWIG module gained support for the perl5 language.
  • GENERATOR EXPRESSIONS:
  • The $ generator expression was added to prevent usage requirements from being exported to dependent projects.
  • CTEST:
  • The CTEST_NO_TESTS_ACTION environment variable was added to provide a default value for the --no-tests= command line argument of ctest(1).
  • DEPRECATED AND REMOVAL FEATURES:
  • The CMakeFiles/CMakeOutput.log and CMakeFiles/CMakeError.log files are no longer populated by CMake's built-in modules. cmake(1) no longer suggests looking at them after a CMake Error occurs. Information previously logged to those files is instead logged to the cmake-configure-log(7).
  • On CYGWIN, the undocumented CMAKE_LEGACY_CYGWIN_WIN32 mode 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__STANDARD, are now placed before flags added by target_compile_options(), rather than after them.
  • For all COMPILE_DEFINITIONS properties, any leading -D on an item is removed whether or not it was specified by a generator expression.
  • The compile_commands.json database enabled by CMAKE_EXPORT_COMPILE_COMMANDS now provides the output field in the compile commands objects. This allows multi-config generators, such as the Ninja Multi-Config generator, to provide the compile commands for all configurations.
  • The USE_FOLDERS global property is treated as ON by 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 --trace option now follows try_compile() and try_run() invocations.

New in CMake 3.25.3 (Mar 9, 2023)

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

New in CMake 3.25.2 (Jan 20, 2023)

  • CUDA language level 20 (corresponding to C++20) is now supported with NVCC 12.0 and above.
  • On Windows, the icpx compiler now provided by Intel oneAPI 2023.0 and above is no longer selected because its GNU-like command-line is not yet supported by CMake.

New in CMake 3.25.1 (Dec 5, 2022)

  • On Windows, when targeting the MSVC ABI, the find_library() command no longer accepts .a file names. This behavior was added in CMake 3.25.0, but has been reverted due finding GNU-ABI libraries in cases we did not previously.

New in CMake 3.25.0 (Nov 16, 2022)

  • NEW FEATURES:
  • Presets:
  • The cmake-presets(7) schema version has been bumped to 6.
  • The cmake-presets(7) format now supports a packagePresets field to specify presets for cpack --preset.
  • The cmake-presets(7) format now supports a workflowPresets field to specify presets for cmake --workflow.
  • The cmake-presets(7) format now supports an outputJUnitFile field to specify JUnit output in test presets.
  • Languages:
  • The Compile Features functionality is now aware of C++26, and defines a cxx_std_26 meta-feature. C++26 compiler modes may also be specified via the CXX_STANDARD, CUDA_STANDARD, HIP_STANDARD, or OBJCXX_STANDARD target properties.
  • CUDA language support now includes device link-time optimization when using nvcc. The CMAKE_INTERPROCEDURAL_OPTIMIZATION variable and the associated INTERPROCEDURAL_OPTIMIZATION target property will activate device LTO.
  • Command-Line:
  • A cmake --workflow --preset mode was added to drive sequences of configure, build, test, and package operations through a single command.
  • The cmake -E capabilities command gained a new tls field that tells whether or not TLS is enabled.
  • The cmake -E env command-line tool gained a --modify flag to support ENVIRONMENT_MODIFICATION operations.
  • The cmake --debug-trycompile option now prints log messages reporting the directory in which each try-compile check is done.
  • Compilers:
  • Support for the Tasking compiler toolsets (SmartCode, TriCore, Standalone: ARM, MCS, 8051) was added with compiler id Tasking. See the CMAKE_TASKING_TOOLSET variable.
  • Commands:
  • The add_subdirectory() command gained a SYSTEM option to enable the SYSTEM directory property in the subdirectory.
  • The block() and endblock() commands were added to manage specific scopes (policy or variable) for a contained block of commands.
  • The cmake_language() command gained a new GET_MESSAGE_LOG_LEVEL sub-command. It can be used to query the current message logging level.
  • The find_file(), find_path(), find_library(), and find_program() commands gained a VALIDATOR option to specify a function to be called for each candidate item to validate it.
  • The find_package() command now considers paths of the form /*/(cmake|CMake)/*/ when searching for package configuration files.
  • The return() command gained a PROPAGATE option to propagate variables to the scope to which control returns. See policy CMP0140.
  • The try_compile() and try_run() commands gained new signatures that more consistently use keyword dispatch and do not require a binary directory to be specified. Additionally, these signatures use a unique directory for each invocation, which allows multiple outputs to be preserved when using cmake --debug-trycompile.
  • The try_compile() and try_run() commands gained the option NO_CACHE to store results in normal variables.
  • The try_run() command gained RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE options to capture stdout and stderr separately from the output of the compiled program.
  • Variables:
  • The BSD and CMAKE_HOST_BSD variables are now set to a string value when the target or host system is BSD, respectively.
  • The LINUX and CMAKE_HOST_LINUX variables are now set to true when the target or host system is Linux, respectively.
  • The CMAKE_MSVC_DEBUG_INFORMATION_FORMAT variable and MSVC_DEBUG_INFORMATION_FORMAT target property were introduced to select the debug information format for compilers targeting the MSVC ABI. See policy CMP0141.
  • The CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION variable and corresponding XCODE_SCHEME_ENABLE_GPU_API_VALIDATION target property were added to tell the Xcode generator what to put in the scheme's Metal: API Validation setting.
  • The CMAKE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION variable and corresponding XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION target property were added to tell the Xcode generator what to put in the scheme's Metal: Shader Validation setting.
  • The CMAKE_XCODE_SCHEME_LAUNCH_MODE variable and corresponding XCODE_SCHEME_LAUNCH_MODE target property were added to tell the Xcode generator what to put in the scheme's "Launch" mode setting.
  • The CMAKE_XCODE_SCHEME_LAUNCH_CONFIGURATION variable and corresponding XCODE_SCHEME_LAUNCH_CONFIGURATION target property were added to tell the Xcode generator what configuration to put in the scheme's Launch action.
  • Properties:
  • The _COMPILER_LAUNCHER target property now supports generator expressions.
  • The EXPORT_NO_SYSTEM target property was added to specify that install(EXPORT) and export() commands will generate na imported target with SYSTEM property OFF.
  • The SYSTEM target property was added to specify whether a target should be treated as a system library (i.e. its include directories are automatically SYSTEM when compiling consumers). If not set, the default is the previous behavior: on for imported targets and off for other targets.
  • The SYSTEM directory property was added to initialize the SYSTEM target property for targets created in that directory.
  • Modules:
  • The FetchContent module FetchContent_Declare() command gained a SYSTEM option to enable the SYSTEM directory property in the subdirectory.
  • The FindCUDAToolkit module now provides a target for nvtx3 for CUDA 10.0+, which supersedes nvToolsExt. A deprecation warning is emitted when using nvToolsExt if the project requires CMake 3.25 and CUDA 10.0+ is used.
  • The FindDoxygen module's version handling has been improved:
  • Multiple candidate installations will now be considered, if needed, to satisfy version constraints. Previously, only the first one encountered would be considered.
  • Version ranges are supported.
  • Variations in the version format reported by Doxygen are now tolerated (e.g. a trailing git commit hash).
  • The FindOpenAL module now provides an imported target.
  • The FindOpenSP module was added to find the OpenSP library.
  • The FindVulkan module gained support for new components:
  • dxc:
  • DirectX Shader Compiler.
  • volk:
  • Volk open-source vulkan meta-loader.
  • CPack:
  • The CPack Archive Generator gained a new CPACK_ARCHIVE_FILE_EXTENSION variable to control the package file name extension.
  • The CPack NSIS Generator gained two new variables CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS and CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS to provide arguments to the nsis executable invocation.
  • The CPack module gained the CPACK_READELF_EXECUTABLE, CPACK_OBJCOPY_EXECUTABLE, and CPACK_OBJDUMP_EXECUTABLE variables to control the locations of binutils used by cpack(1).
  • Deprecated and Removed Features:
  • The IMPORTED_NO_SYSTEM target property has been deprecated in favor of SYSTEM and EXPORT_NO_SYSTEM.
  • The Visual Studio 10 2010 generator has been removed.
  • The Visual Studio 11 2012 generator is now deprecated and will be removed in a future version of CMake.
  • Other Changes:
  • On Windows, when targeting the MSVC ABI, the find_library() command now accepts .a file names after first considering .lib. This is symmetric with existing behavior when targeting the GNU ABI, in which the command accepts .lib file names after first considering .a.
  • The SSL_CERT_FILE and SSL_CERT_DIR environment variables can now be used to override where to find certificate authorities for TLS/SSL operations.
  • If _CLANG_TIDY includes a -p argument, the full compiler command line is no longer appended after --.
  • The Xcode generator no longer adds the per-config suffix $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to library search paths. See policy CMP0142.

New in CMake 3.25.0 RC 4 (Nov 9, 2022)

  • NEW FEATURES:
  • Presets:
  • The cmake-presets(7) schema version has been bumped to 6.
  • The cmake-presets(7) format now supports a packagePresets field to specify presets for cpack --preset.
  • The cmake-presets(7) format now supports a workflowPresets field to specify presets for cmake --workflow.
  • The cmake-presets(7) format now supports an outputJUnitFile field to specify JUnit output in test presets.
  • Languages:
  • The Compile Features functionality is now aware of C++26, and defines a cxx_std_26 meta-feature. C++26 compiler modes may also be specified via the CXX_STANDARD, CUDA_STANDARD, HIP_STANDARD, or OBJCXX_STANDARD target properties.
  • CUDA language support now includes device link-time optimization when using nvcc. The CMAKE_INTERPROCEDURAL_OPTIMIZATION variable and the associated INTERPROCEDURAL_OPTIMIZATION target property will activate device LTO.
  • Command-Line:
  • A cmake --workflow --preset mode was added to drive sequences of configure, build, test, and package operations through a single command.
  • The cmake -E capabilities command gained a new tls field that tells whether or not TLS is enabled.
  • The cmake -E env command-line tool gained a --modify flag to support ENVIRONMENT_MODIFICATION operations.
  • The cmake --debug-trycompile option now prints log messages reporting the directory in which each try-compile check is done.
  • Compilers:
  • Support for the Tasking compiler toolsets (SmartCode, TriCore, Standalone: ARM, MCS, 8051) was added with compiler id Tasking. See the CMAKE_TASKING_TOOLSET variable.
  • Commands:
  • The add_subdirectory() command gained a SYSTEM option to enable the SYSTEM directory property in the subdirectory.
  • The block() and endblock() commands were added to manage specific scopes (policy or variable) for a contained block of commands.
  • The cmake_language() command gained a new GET_MESSAGE_LOG_LEVEL sub-command. It can be used to query the current message logging level.
  • The find_file(), find_path(), find_library(), and find_program() commands gained a VALIDATOR option to specify a function to be called for each candidate item to validate it.
  • The find_package() command now considers paths of the form /*/(cmake|CMake)/*/ when searching for package configuration files.
  • The return() command gained a PROPAGATE option to propagate variables to the scope to which control returns. See policy CMP0140.
  • The try_compile() and try_run() commands gained new signatures that more consistently use keyword dispatch and do not require a binary directory to be specified. Additionally, these signatures use a unique directory for each invocation, which allows multiple outputs to be preserved when using cmake --debug-trycompile.
  • The try_compile() and try_run() commands gained the option NO_CACHE to store results in normal variables.
  • The try_run() command gained RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE options to capture stdout and stderr separately from the output of the compiled program.
  • Variables:
  • The BSD and CMAKE_HOST_BSD variables are now set to a string value when the target or host system is BSD, respectively.
  • The LINUX and CMAKE_HOST_LINUX variables are now set to true when the target or host system is Linux, respectively.
  • The CMAKE_MSVC_DEBUG_INFORMATION_FORMAT variable and MSVC_DEBUG_INFORMATION_FORMAT target property were introduced to select the debug information format for compilers targeting the MSVC ABI. See policy CMP0141.
  • The CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION variable and corresponding XCODE_SCHEME_ENABLE_GPU_API_VALIDATION target property were added to tell the Xcode generator what to put in the scheme's Metal: API Validation setting.
  • The CMAKE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION variable and corresponding XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION target property were added to tell the Xcode generator what to put in the scheme's Metal: Shader Validation setting.
  • The CMAKE_XCODE_SCHEME_LAUNCH_MODE variable and corresponding XCODE_SCHEME_LAUNCH_MODE target property were added to tell the Xcode generator what to put in the scheme's "Launch" mode setting.
  • The CMAKE_XCODE_SCHEME_LAUNCH_CONFIGURATION variable and corresponding XCODE_SCHEME_LAUNCH_CONFIGURATION target property were added to tell the Xcode generator what configuration to put in the scheme's Launch action.
  • Properties:
  • The _COMPILER_LAUNCHER target property now supports generator expressions.
  • The EXPORT_NO_SYSTEM target property was added to specify that install(EXPORT) and export() commands will generate na imported target with SYSTEM property OFF.
  • The SYSTEM target property was added to specify whether a target should be treated as a system library (i.e. its include directories are automatically SYSTEM when compiling consumers). If not set, the default is the previous behavior: on for imported targets and off for other targets.
  • The SYSTEM directory property was added to initialize the SYSTEM target property for targets created in that directory.
  • Modules:
  • The FetchContent module FetchContent_Declare() command gained a SYSTEM option to enable the SYSTEM directory property in the subdirectory.
  • The FindCUDAToolkit module now provides a target for nvtx3 for CUDA 10.0+, which supersedes nvToolsExt. A deprecation warning is emitted when using nvToolsExt if the project requires CMake 3.25 and CUDA 10.0+ is used.
  • The FindDoxygen module's version handling has been improved:
  • Multiple candidate installations will now be considered, if needed, to satisfy version constraints. Previously, only the first one encountered would be considered.
  • Version ranges are supported.
  • Variations in the version format reported by Doxygen are now tolerated (e.g. a trailing git commit hash).
  • The FindOpenAL module now provides an imported target.
  • The FindOpenSP module was added to find the OpenSP library.
  • The FindVulkan module gained support for new components:
  • dxc:
  • DirectX Shader Compiler.
  • volk:
  • Volk open-source vulkan meta-loader.
  • CPack:
  • The CPack Archive Generator gained a new CPACK_ARCHIVE_FILE_EXTENSION variable to control the package file name extension.
  • The CPack NSIS Generator gained two new variables CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS and CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS to provide arguments to the nsis executable invocation.
  • The CPack module gained the CPACK_READELF_EXECUTABLE, CPACK_OBJCOPY_EXECUTABLE, and CPACK_OBJDUMP_EXECUTABLE variables to control the locations of binutils used by cpack(1).
  • Deprecated and Removed Features:
  • The IMPORTED_NO_SYSTEM target property has been deprecated in favor of SYSTEM and EXPORT_NO_SYSTEM.
  • The Visual Studio 10 2010 generator has been removed.
  • The Visual Studio 11 2012 generator is now deprecated and will be removed in a future version of CMake.
  • Other Changes:
  • On Windows, when targeting the MSVC ABI, the find_library() command now accepts .a file names after first considering .lib. This is symmetric with existing behavior when targeting the GNU ABI, in which the command accepts .lib file names after first considering .a.
  • The SSL_CERT_FILE and SSL_CERT_DIR environment variables can now be used to override where to find certificate authorities for TLS/SSL operations.
  • If _CLANG_TIDY includes a -p argument, the full compiler command line is no longer appended after --.
  • The Xcode generator no longer adds the per-config suffix $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to library search paths. See policy CMP0142.

New in CMake 3.24.3 (Nov 1, 2022)

  • The LLVMFlang Fortran compiler support added in 3.24.0 has been extended:
  • It now supports mixed-language linking between Fortran and C or CXX.
  • It now supports the GNU ABI (MinGW) on Windows, but not yet the MSVC ABI.
  • Some implementation updates were made to support ecosystem changes and/or fix regressions.

New in CMake 3.24.2 (Sep 14, 2022)

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

New in CMake 3.24.1 (Aug 20, 2022)

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

New in CMake 3.24.0 (Aug 6, 2022)

  • NEW FEATURES:
  • Presets:
  • cmake-presets(7) files now support schema version 5.
  • cmake-presets(7) files now support a ${pathListSep} macro, which expands to : or ; based on the platform.
  • cmake-presets(7) files gained support for specifying a testOutputTruncation field in test presets, which specifies the truncation mode once the maximum test output size has been reached.
  • Generators:
  • The Green Hills MULTI generator now generates build rules to re-run CMake if any CMake files are updated.
  • The Visual Studio Generators now support SYSTEM headers when using VS 2019 Update 11 or later.
  • Command-Line:
  • cmake(1) gained the --fresh command-line option to remove any existing CMakeCache.txt file and associated CMakeFiles/ directory, when configuring a build tree, thus starting a new configuration as if the build tree were freshly created.
  • cmake(1) gained the --compile-no-warning-as-error command-line option which causes the effects of the COMPILE_WARNING_AS_ERROR target property and CMAKE_COMPILE_WARNING_AS_ERROR variable to be ignored.
  • The cmake(1) --trace=json-v1 trace format gained fields global_frame and line_end.
  • The cmake(1) -E commands cat and env learned to respect a double dash (--) argument that acts as a delimiter indicating the end of options. Any following arguments are treated as operands/positional arguments, even if they begin with a dash - character.
  • The cmake(1) -E tar command gained the --touch option to keep the current local timestamp instead of extracting file timestamps from the archive.
  • Compilers:
  • LLVM's flang Fortran compiler is now supported on some platforms, with compiler id LLVMFlang.
  • ADSP compiler support (SHARC and Blackfin) now covers both CCES and VDSP++ installations, with required configuration now done in the compiler module itself rather than the Generic-ADSP platform module.
  • Platforms:
  • A dedicated ADSP platform has been added to replace the existing Generic-ADSP implementation. This features automatic detection of the latest CCES/VDSP++ install and compiler selection (cc21k vs. ccblkfn) based off of the CMAKE_SYSTEM_PROCESSOR variable.
  • Commands:
  • The cmake_host_system_information() command, on Windows, gained a QUERY WINDOWS_REGISTRY mode. See its Query Windows registry section.
  • The cmake_language() command gained a new SET_DEPENDENCY_PROVIDER sub-command. When a dependency provider is set, calls to find_package() and FetchContent_MakeAvailable() can be redirected through a custom command, which can choose to fulfill the request directly, modify how the request is processed, or leave it to be fulfilled by the built-in implementation. See Dependency Providers.
  • The file(DOWNLOAD) command gained options RANGE_START and RANGE_END to specify a range of bytes to download. This can be useful for downloading parts of big binary files.
  • The find_file(), find_path(), find_library(), find_program(), and find_package() commands gained the NO_CMAKE_INSTALL_PREFIX option to control searching CMAKE_INSTALL_PREFIX.
  • The find_file(), find_path(), find_library(), find_program(), and find_package() commands gained the ability to specify which Windows Registry views must be queried.
  • The find_package() command gained a GLOBAL option that allows for the promotion of imported targets to global scope for the duration of the find_package() call.
  • The if() command gained the capability to compare paths by using the PATH_EQUAL operator. See policy CMP0139.
  • Variables:
  • The CMAKE_COLOR_DIAGNOSTICS variable was added to control color diagnostics generated by compilers. This variable also controls color build system messages with Makefile Generators, replacing CMAKE_COLOR_MAKEFILE.
  • The CMAKE_COLOR_DIAGNOSTICS environment variable was added to set a default value for CMAKE_COLOR_DIAGNOSTICS.
  • The CMAKE_COMPILE_WARNING_AS_ERROR variable and corresponding COMPILE_WARNING_AS_ERROR target property were added to enable compilation with a compiler-specific flag to treat warnings as errors, such as -Werror.
  • The CMAKE_CUDA_ARCHITECTURES variable and associated CUDA_ARCHITECTURES target property now support the special native value to compile for the architectures(s) of the host's GPU(s).
  • The CMAKE_FIND_PACKAGE_TARGETS_GLOBAL variable was added to toggle behavior of the find_package() command's new GLOBAL option.
  • The CMAKE_FIND_USE_INSTALL_PREFIX variable was added to toggle behavior of the find_file(), find_library(), find_path(), find_package(), and find_program() commands' new NO_CMAKE_INSTALL_PREFIX option.
  • The CMAKE_PROJECT_TOP_LEVEL_INCLUDES variable was added to allow injecting custom code at the site of the first project() call, after the host and target platform details have been determined.
  • The CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES variable was added to tell the try_compile() command not to pass any platform variables to the test project.
  • The CMAKE_VERIFY_INTERFACE_HEADER_SETS variable and corresponding VERIFY_INTERFACE_HEADER_SETS target property were added to enable build rules that verify all headers in header sets can be used on their own.
  • The CMAKE_VS_NO_COMPILE_BATCHING variable and corresponding VS_NO_COMPILE_BATCHING target property were added to tell Visual Studio Generators whether to disable compiler parallelism and call the compiler with one source file at a time.
  • The CMAKE_WATCOM_RUNTIME_LIBRARY variable and WATCOM_RUNTIME_LIBRARY target property were introduced to select the runtime library used by compilers targeting the Watcom ABI. See policy CMP0136.
  • The CMAKE_XCODE_XCCONFIG variable and corresponding XCODE_XCCONFIG target property were added to tell the Xcode generator to handle xcconfig files.
  • Properties:
  • The INTERFACE_LINK_LIBRARIES_DIRECT and INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE target properties were added to express usage requirements affecting a consumer's direct link dependencies.
  • The INTERFACE_HEADER_SETS_TO_VERIFY target property was added to specify which header sets should be verified by VERIFY_INTERFACE_HEADER_SETS.
  • The LINK_LIBRARIES target property now supports the $ generator expression. See policy CMP0131.
  • The VS_DOTNET_STARTUP_OBJECT target property was added to tell Visual Studio Generators which startup class shall be used when the program or project is executed. This is necessary when more than one static void Main(string[]) function signature is available in a managed .NET project.
  • Modules:
  • The ExternalProject module ExternalProject_Add() command gained a new DOWNLOAD_EXTRACT_TIMESTAMP option for controlling whether the timestamps of extracted contents are set to match those in the archive when the URL download method is used. Policy CMP0135 was added to enable the option by default.
  • The FetchContent module and the find_package() command now support integration capabilities:
  • FetchContent_MakeAvailable() can now try to satisfy a dependency by calling find_package() first. A new FETCHCONTENT_TRY_FIND_PACKAGE_MODE variable controls whether this is done by default for all dependencies, is opt-in per dependency, or is disabled entirely.
  • find_package() can be re-routed to call FetchContent_MakeAvailable() instead. A new read-only CMAKE_FIND_PACKAGE_REDIRECTS_DIR variable points to a directory where config package files can be located to facilitate these re-routed calls.
  • The FindJNI module now provides imported targets.
  • The FindMatlab module matlab_add_mex() function gained a NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES option to disable automatic linking of MATLAB libraries.
  • The FindVulkan module now supports components to select which VulkanSDK tool and libraries to find in addition to the Vulkan SDK headers and library.
  • The FindZLIB gained a new ZLIB_USE_STATIC_LIBS variable to search only for static libraries.
  • Generator Expressions:
  • The LINK_LIBRARY generator expression was added to manage how libraries are specified during the link step. The CMAKE__LINK_LIBRARY_USING_ and CMAKE_LINK_LIBRARY_USING_ variables are used to define features usable by the LINK_LIBRARY generator expression. Moreover, the LINK_LIBRARY_OVERRIDE and LINK_LIBRARY_OVERRIDE_ target properties are available to resolve incompatible features.
  • The LINK_LIBRARY generator expression can link frameworks in various ways when targeting Apple platforms. The following features were added:
  • FRAMEWORK
  • NEEDED_FRAMEWORK
  • REEXPORT_FRAMEWORK
  • WEAK_FRAMEWORK
  • The LINK_LIBRARY generator expression can link libraries in various ways when targeting Apple platforms. The following features were added:
  • NEEDED_LIBRARY
  • REEXPORT_LIBRARY
  • WEAK_LIBRARY
  • The LINK_LIBRARY generator expression gained the feature WHOLE_ARCHIVE to force load of all members in a static library. This feature is supported on the following target platforms:
  • all Apple variants
  • Linux
  • all BSD variants
  • SunOS
  • Windows
  • CYGWIN
  • MSYS
  • The LINK_GROUP generator expression was added to manage the grouping of libraries during the link step. The CMAKE__LINK_GROUP_USING_ and CMAKE_LINK_GROUP_USING_ variables are used to define features usable with the LINK_GROUP generator expression. This release defines the RESCAN feature, which can be used to handle circular references among static libraries when using toolchains for Linux, BSD, SunOS and GNU toolchains for Windows.
  • The PATH generator expression was added to manage paths.
  • The PATH_EQUAL generator expression was added to manage path comparisons.
  • The TARGET_BUNDLE_DIR_NAME generator expression was added to evaluate to the name of the bundle directory for a given bundle target.
  • CTest:
  • ctest(1) gained a --test-output-truncation option (and corresponding CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION variable) to specify the truncation mode once the maximum test output size has been reached. Possible values are tail (default), middle or head.
  • CPack:
  • The CPack WIX Generator gained a new variable, CPACK_WIX_ARCHITECTURE, to specify the installer architecture in order to support computers running Windows for ARM.
  • CPack now supports the CPACK_THREADS option for zstd compression when compiled with libarchive 3.6 or higher. It is supported by official CMake binaries available on cmake.org.
  • Deprecated and Removed Features:
  • The CPack module no longer enables the SLA by default in the CPack DragNDrop Generator. See policy CMP0133 and the CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE variable.
  • The deprecated CPack PackageMaker Generator has been removed.
  • The FindGLUT module no longer provides the undocumented GLUT_LIBRARY and GLUT_INCLUDE_PATH result variables.
  • Other Changes:
  • CMake no longer sets environment variables like CC, CXX, etc. when enabling the corresponding language during the first CMake run in a build directory. See policy CMP0132.
  • The CheckIPOSupported module check_ipo_supported() command now uses the caller's CMAKE__FLAGS and CMAKE__FLAGS_ values. See policy CMP0138.
  • The MSYS Makefiles and MinGW Makefiles generators, when a compiler is not explicitly specified, now select the first compiler (of any name) found in directories listed by the PATH environment variable.
  • The try_compile() command whole-project signature now propagates platform variables. See policy CMP0137.
  • The while() command now diagnoses errors during condition evaluation. See policy CMP0130.
  • The precompiled macOS binaries provided on cmake.org no longer attach a SLA to the .dmg packages. This was removed because macOS 12 deprecated the tools used to attach .dmg resources.
  • A precompiled Windows arm64 binary is now provided on cmake.org.

New in CMake 3.23.0 (Mar 30, 2022)

  • 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) files now support a ${fileDir} macro, which contains the directory containing the preset file.
  • cmake-presets(7) gained support for specifying the resolvePackageReferences command line option in a build preset to control restoration behavior of package references from external package managers. Currently this is only supported by the Visual Studio generator to support restoring packages from NuGet. Other generators ignore this option.
  • Generators:
  • The Visual Studio Generators for VS 2019 and above learned to support .NET SDK-style project files (.csproj) for C# projects. See the DOTNET_SDK target property and corresponding CMAKE_DOTNET_SDK variable. add_custom_command() is not yet supported in .NET SDK-style projects.
  • The Visual Studio Generators for VS 2017 and above learned to use portable instances of Visual Studio not known to the VS installer. See the CMAKE_GENERATOR_INSTANCE variable.
  • 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= 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:
  • The CMAKE_CUDA_ARCHITECTURES variable and associated CUDA_ARCHITECTURES target property now support the all, and all-major values for CUDA toolkit 7.0+.
  • The CMAKE_IGNORE_PREFIX_PATH and CMAKE_SYSTEM_IGNORE_PREFIX_PATH variables were added to tell the find_package(), find_program(), find_library(), find_path(), and find_file() commands to ignore specified prefixes.
  • The CMAKE_LINK_LIBRARIES_ONLY_TARGETS variable and corresponding LINK_LIBRARIES_ONLY_TARGETS target property were added to optionally require that all link items that can be target names are actually names of existing targets.
  • Properties:
  • The HEADER_SETS and INTERFACE_HEADER_SETS target properties were added to list header sets associated with a target.
  • The HEADER_SET and HEADER_SET_ target properties were added to list files in the default header set and named header sets, respectively.
  • The HEADER_DIRS and HEADER_DIRS_ target properties were added to specify the base directories of the default header set and named header sets, respectively.
  • The IMPORTED_NO_SYSTEM target property was added to specify that an Imported Target should not be treated as a system library (i.e. its include directories are not automatically SYSTEM).
  • The XCODE_EMBED_PLUGINS target property was added to tell the Xcode generator what targets to put in the Embed PlugIns build phase.
  • The XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE target property and supporting CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE variable were added to tell the Xcode generator to enable specifying the Xcode scheme option property GPU Frame Capture.
  • 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:
  • ctest(1) gained a new CTEST_SUBMIT_INACTIVITY_TIMEOUT variable, which can be used to specify a timeout for submission inactivity.
  • CPack:
  • The CPack productbuild Generator gained the new CPACK_PRODUCTBUILD_DOMAINS, CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE, CPACK_PRODUCTBUILD_DOMAINS_USER, and CPACK_PRODUCTBUILD_DOMAINS_ROOT variables for adding the domains element to the Distribution XML. With these variables, it is now possible to install products to the user's home directory without requiring administrative privileges.
  • The CPack productbuild Generator gained a new variable, CPACK_PRODUCTBUILD_IDENTIFIER, used to customize the unique product identifier associated with the product.
  • The CPack IFW Generator gained the new CPACK_IFW_ARCHIVE_FORMAT and CPACK_IFW_ARCHIVE_COMPRESSION variables for setting the format used when packaging new component data archives, and choosing the compression level used. These features are available for QtIFW 4.2 and newer.
  • The CPack IFW Generator gained new CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE variable to prevent the user from passing any consumer command to the installer, like install, update, and remove. This feature is available for QtIFW 4.0 and newer.
  • The CPack IFW Generator gained the new CPACK_IFW_PACKAGE_PRODUCT_IMAGES variable for adding a list of images to be shown on the PerformInstallationPage. This feature is available for QtIFW 4.0 and newer.
  • The CPack IFW Generator gained the new CPACK_IFW_PACKAGE_RUN_PROGRAM, CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS, and CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION variables for executing a command after the installer is done if the user accepts the action. This feature is available for QtIFW 4.0 and newer.
  • The CPack IFW Generator gained the new CPACK_IFW_PACKAGE_SIGNING_IDENTITY variable for specifying a code signing identity to be used for signing the generated app bundle. This feature is available on macOS only, and for QtIFW 3.0 and newer.
  • The CPack WIX Generator gained a new variable, CPACK_WIX_SKIP_WIX_UI_EXTENSION, to skip the inclusion of WixUIExtensions.
  • Deprecated and Removed Features:
  • cmake(1) now warns when multiple source paths are specified, as in cmake -S src1 src2. This has never been officially documented or supported, but older versions accidentally accepted multiple source paths and used the last path specified. Update scripts to avoid passing multiple source path arguments.
  • The cpack(1) undocumented OSXX11 generator has been removed.
  • Other Changes:
  • The CPack DragNDrop Generator no longer attaches CPACK_RESOURCE_FILE_LICENSE as the license agreement in the generated .dmg unless explicitly activated by a CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE option. In CMake projects, the CPack module enables the option by default for compatibility.
  • CUDA targets may now enable both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATION.
  • CUDA compiler detection now:
  • issues an error in all cases when it's unable to compute the default architecture(s) if required (see CMP0104),
  • handles OFF for CMAKE_CUDA_ARCHITECTURES on Clang,
  • supports the theoretical case of multiple default architectures, and
  • tries to detect invalid architectures and issue an error.
  • CUDA with Clang now implements policy CMP0105 and the $ and $ generator expressions.
  • The define_property() command's BRIEF_DOCS and FULL_DOCS arguments are now optional.
  • ccmake(1) may now be enabled on Windows when building CMake from source. This is experimental, and so is not included in official distributions.

New in CMake 3.23.0 RC 3 (Mar 13, 2022)

  • cmake-presets(7)” files now have an optional “include” field, which
  • allows the files to include other files.
  • The Visual Studio Generators for VS 2019 and above learned to
  • support .NET SDK-style project files (“.csproj”) for C# projects.
  • See the “DOTNET_SDK” target property and corresponding
  • “CMAKE_DOTNET_SDK” variable. “add_custom_command()” is not yet
  • supported in .NET SDK-style projects.
  • 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”.
  • The “install(TARGETS)” command gained a new “FILE_SET” argument,
  • which can be used to install header file sets associated with a
  • target.
  • 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.
  • The “CMAKE_CUDA_ARCHITECTURES” variable and associated
  • “CUDA_ARCHITECTURES” target property now support the “all”, and
  • “all-major” values for CUDA toolkit 7.0+.

New in CMake 3.23.0 RC 1 (Feb 9, 2022)

  • Some of the more significant changes in CMake 3.23 are:
  • “cmake-presets(7)” files now have an optional “include” field, which
  • allows the files to include other files.
  • The Visual Studio Generators for VS 2019 and above learned to
  • support .NET SDK-style project files (“.csproj”) for C# projects.
  • See the “DOTNET_SDK” target property and corresponding
  • “CMAKE_DOTNET_SDK” variable. “add_custom_command()” is not yet
  • supported in .NET SDK-style projects.
  • 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”.
  • The “install(TARGETS)” command gained a new “FILE_SET” argument,
  • which can be used to install header file sets associated with a
  • target.
  • 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.
  • The “CMAKE_CUDA_ARCHITECTURES” variable and associated
  • “CUDA_ARCHITECTURES” target property now support the “all”, and
  • “all-major” values for CUDA toolkit 7.0+.
  • 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:
  • The Visual Studio Generators for VS 2019 and above learned to support .NET SDK-style project files (".csproj") for C# projects.
  • See the "DOTNET_SDK" target property and corresponding
  • "CMAKE_DOTNET_SDK" variable. "add_custom_command()" is not yet
  • supported in .NET SDK-style projects.
  • The Visual Studio Generators for VS 2017 and above learned to use portable instances of Visual Studio not known to the VS installer.
  • See the "CMAKE_GENERATOR_INSTANCE" variable.
  • 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=" 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:
  • The "CMAKE_CUDA_ARCHITECTURES" variable and associated "CUDA_ARCHITECTURES" target property now support the "all", and "all-major" values for CUDA toolkit 7.0+.
  • The "CMAKE_IGNORE_PREFIX_PATH" and "CMAKE_SYSTEM_IGNORE_PREFIX_PATH" variables were added to tell the "find_package()", "find_program()", "find_library()", "find_path()", and "find_file()" commands to ignore specified prefixes.
  • The "CMAKE_LINK_LIBRARIES_ONLY_TARGETS" variable and corresponding "LINK_LIBRARIES_ONLY_TARGETS" target property were added to optionally require that all link items that can be target names are actually names of existing targets.
  • Properties:
  • The "HEADER_SETS" and "INTERFACE_HEADER_SETS" target properties were added to list header sets associated with a target.
  • The "HEADER_SET" and "HEADER_SET_" target properties were added to list files in the default header set and named header sets, respectively.
  • The "HEADER_DIRS" and "HEADER_DIRS_" target properties were added to specify the base directories of the default header set and named header sets, respectively.
  • The "IMPORTED_NO_SYSTEM" target property was added to specify that an Imported Target should not be treated as a system library (i.e. its include directories are not automatically "SYSTEM").
  • The "INTERFACE_LINK_LIBRARIES_DIRECT" and "INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE" target properties were added to express usage requirements affecting a consumer's direct link dependencies.
  • The "XCODE_EMBED_PLUGINS" target property was added to tell the "Xcode" generator what targets to put in the "Embed PlugIns" build phase.
  • The "XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE" target property and supporting "CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE" variable were added to tell the "Xcode" generator to enable specifying the Xcode scheme option property "GPU Frame Capture".
  • 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:
  • "ctest(1)" gained a new "CTEST_SUBMIT_INACTIVITY_TIMEOUT" variable, which can be used to specify a timeout for submission inactivity.
  • CPack:
  • The "CPack productbuild Generator" gained the new PACK_PRODUCTBUILD_DOMAINS", "CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE", CPACK_PRODUCTBUILD_DOMAINS_USER", and PACK_PRODUCTBUILD_DOMAINS_ROOT" variables for adding the domains element to the Distribution XML.
  • The "CPack productbuild Generator" gained a new variable, "CPACK_PRODUCTBUILD_IDENTIFIER", used to customize the unique product identifier associated with the product.
  • The "CPack IFW Generator" gained the new "CPACK_IFW_ARCHIVE_FORMAT" and "CPACK_IFW_ARCHIVE_COMPRESSION" variables for setting the format used when packaging new component data archives, and choosing the compression level used. These features are available for QtIFW 4.2
  • and newer.
  • The "CPack IFW Generator" gained new "CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE" variable to prevent the user from passing any consumer command to the installer, like "install", "update", and "remove". This feature is available for QtIFW 4.0 and newer.
  • The "CPack IFW Generator" gained the new "CPACK_IFW_PACKAGE_PRODUCT_IMAGES" variable for adding a list of images to be shown on the "PerformInstallationPage". This feature is available for QtIFW 4.0 and newer.
  • The "CPack IFW Generator" gained the new "CPACK_IFW_PACKAGE_RUN_PROGRAM",
  • "CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS", and "CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION" variables for executing a command after the installer is done if the user accepts the action. This feature is available for QtIFW 4.0 and newer.
  • The "CPack IFW Generator" gained the new "CPACK_IFW_PACKAGE_SIGNING_IDENTITY" variable for specifying a code signing identity to be used for signing the generated app bundle. This feature is available on macOS only, and for QtIFW 3.0 and newer.
  • The "CPack WIX Generator" gained a new variable, PACK_WIX_SKIP_WIX_UI_EXTENSION", to skip the inclusion of WixUIExtensions.
  • Deprecated and Removed Features:
  • The "cpack(1)" undocumented "OSXX11" generator has been removed.
  • Other Changes:
  • The "CPack DragNDrop Generator" no longer attaches "CPACK_RESOURCE_FILE_LICENSE" as the license agreement in the generated ".dmg" unless explicitly activated by a
  • "CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE" option. In CMake projects, the "CPack" module enables the option by default for compatibility.
  • "CUDA" targets may now enable both "CUDA_SEPARABLE_COMPILATION" and "CUDA_PTX_COMPILATION".
  • "CUDA" compiler detection now:
  • issues an error in all cases when it's unable to compute the default architecture(s) if required (see "CMP0104"),
  • handles "OFF" for "CMAKE_CUDA_ARCHITECTURES" on Clang, supports the theoretical case of multiple default architectures, and
  • tries to detect invalid architectures and issue an error.
  • "CUDA" with Clang now implements policy "CMP0105" and the "" and "" "generator expressions".
  • The "define_property()" command's "BRIEF_DOCS" and "FULL_DOCS" arguments are now optional.
  • "ccmake(1)" may now be enabled on Windows when building CMake from source. This is experimental, and so is not included in official distributions.

New in CMake 3.22.2 (Jan 31, 2022)

  • Benjamin Sluis (1):
  • VS: Remove the '/guard:cf' flag from v143 link flag table
  • Björn Esser (1):
  • FortranCInterface: Fix compatibility with GCC gfortran 12 LTO
  • Brad King (10):
  • FindBoost: Add support for Boost 1.78
  • ci: Explicitly disable Java tests on Windows
  • FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path
  • FindBoost: Do not warn about now-supported version 1.78
  • ci: Explicitly disable Java tests on VS builds
  • file: Restore error capture in undocumented READ_ELF mode
  • MSVC: Use -external:I flag without space to support Clang tools
  • Help: Add missing 3.22.1 section to the release notes
  • gitlab-ci: update macOS jobs to use Xcode 13.2
  • CMake 3.22.2
  • Jukka Jalkanen (1):
  • ASM: Fix identification of armasm 6.17+
  • Oleg Sidorkin (1):
  • FindBoost: Add support for Python 3.10
  • Raul Tambre (4):
  • XL: Detect default extensions mode for legacy compiler
  • CMP0128: Prefix test names with mode
  • CMP0128: Avoid test code duplication
  • CMP0128: Add flag in OLD mode even when standard matches the default
  • Ryan Prichard (1):
  • Android: Fix linking android_support for pre-21 system STL
  • Tomáš Hrnciar (1):
  • FindPython: Add support for Python 3.11
  • William R. Dieter (1):
  • VS: Fix detecting icx.exe with Intel Compiler toolsets newer than 2021

New in CMake 3.22.1 (Dec 8, 2021)

  • Ben Boeckel:
  • gitlab-ci: fix comment typo
  • gitlab-ci: shorten job prefixes
  • Brad King:
  • ci: add gmock to Debian base images
  • try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env vars
  • Help: Document more use cases for CMAKE_POLICY_DEFAULT_CMPNNNN
  • Help: Suggest CMAKE_POLICY_DEFAULT_CMP0077 in CMP0077 docs
  • Help: Suggest CMAKE_POLICY_DEFAULT_CMP0126 in CMP0126 docs
  • gitlab-ci: update macOS jobs to use Xcode 13.1
  • CompilerId: Restore support for classic C by avoiding C++ style comments
  • cmSystemTools: Remove unnecessary mark-as-used casts to void
  • file(RPATH): Restore tolerance of unknown formats if new RPATH is empty
  • FindPkgConfig: Restore finding pkg-config before pkgconf
  • VS: Revert "Add missing label in C# project-build events"
  • ci: Enable more VS tests that use managed code
  • Utilities/Release: Add script to sign/notarize macOS application bundle
  • HIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIP
  • CMake 3.22.1
  • Christoph Reiter:
  • mingw: fix calling convention for strftime()
  • Craig Scott:
  • Help: ENVIRONMENT_MODIFICATION path_list_... separator is based on host
  • Help: Use definition list for allowed values of CMAKE_INSTALL_MODE
  • Help: Explicitly state that if(ENV{some_var}) is always false
  • Help: Be more explicit about the behavior of if()
  • Felix Lelchuk:
  • Help: Clarify CMAKE_INSTALL_MODE documentation
  • Marc Chevrier:
  • UseSWIG: ensure directory for depfile exists
  • FindPython: clarify static libraries hint usage
  • Raphael Gozzo:
  • CMakeParseLibraryArchitecture: Fix parsing /lib/ implicit object path
  • Robert Maynard:
  • GNUInstallDirs: Prefer system lib64 over conda lib when ambiguous

New in CMake 3.22.0 (Nov 18, 2021)

  • NEW FEATURES:
  • Commands:
  • The cmake_host_system_information() command can now query OS identification variables from the /etc/os-release file.
  • The string(TIMESTAMP) command now supports the %V specifier for ISO 8601 week numbers.
  • Variables:
  • The CMAKE_BUILD_TYPE environment variable was added to provide a default value for the CMAKE_BUILD_TYPE variable.
  • The CMAKE_CONFIGURATION_TYPES environment variable was added to provide a default value for the CMAKE_CONFIGURATION_TYPES variable.
  • The CMAKE_INSTALL_MODE environment variable was added to tell install() rules (implemented by file(INSTALL)) to install symbolic links instead of copying of files.
  • The CMAKE__LINK_WHAT_YOU_USE_FLAG and CMAKE_LINK_WHAT_YOU_USE_CHECK variables were added to control the linker flag and check used by the LINK_WHAT_YOU_USE target property.
  • The CMAKE_REQUIRE_FIND_PACKAGE_ variable was added to turn a non-REQUIRED find_package() call into a REQUIRED one.
  • Properties:
  • The _EXTENSIONS target property is now initialized to CMAKE__EXTENSIONS_DEFAULT, detected from the compiler. See CMP0128.
  • The VS_SETTINGS source file property is now supported for all source file types. Previously it worked only for non-built sources.
  • Modules:
  • The CMakeDependentOption module cmake_dependent_option() macro now supports full Condition Syntax. See policy CMP0127.
  • The FetchContent module now passes through the CMAKE_TLS_VERIFY, CMAKE_TLS_CAINFO, CMAKE_NETRC and CMAKE_NETRC_FILE variables (when defined) to the underlying ExternalProject sub-build. Previously, those variables were silently ignored by FetchContent.
  • The FindBLAS and FindLAPACK modules gained a BLA_SIZEOF_INTEGER option to find a BLAS/LAPACK whose ABI uses a specific integer size.
  • The FindJasper module now provides an imported target.
  • The FindMatlab module now provides imported targets.
  • The FindPkgConfig module gained a PKG_CONFIG_ARGN variable to specify arguments to pkg-config calls.
  • The GoogleTest module gtest_discover_tests() function gained a TEST_FILTER option to filter tests using --gtest_filter during test discovery.
  • The UseSWIG module, for Visual Studio Generators, can now use the swig tool to generate implicit dependencies.
  • CTest:
  • ctest(1) learned to recognize labels attached to a test at run time. Previously it was only possible to attach labels to tests at configure time by using the LABELS test property. See Additional Test Measurements for more information.
  • ctest(1) learned to be able to modify the environment for a test through the ENVIRONMENT_MODIFICATION property. This is allows for updates to environment variables based on the environment present at test time.
  • The ctest_memcheck() command now also generates a DynamicAnalysis-Test.xml file which may be used to submit test results to CDash.
  • CPack:
  • The CPack DEB Generator gained the option to set CPACK_DEBIAN_COMPRESSION_TYPE to zstd, which enables Zstandard compression for deb packages.
  • The CPack NSIS Generator gained a new CPACK_NSIS_IGNORE_LICENSE_PAGE variable to suppress the license page in the installer.
  • The CPack RPM Generator gained the CPACK_RPM_REQUIRES_EXCLUDE_FROM option to avoid scanning specific paths for dependencies.
  • Deprecated and Removed Features:
  • The Visual Studio 10 2010 generator is now deprecated and will be removed in a future version of CMake.
  • Other Changes:
  • The Compile Features functionality now correctly disables or enables compiler extensions when no standard level is specified and avoids unnecessarily adding language standard flags if the requested settings match the compiler's defaults. See CMP0128.
  • The Compile Features functionality now ignores features for languages that are not enabled.
  • The Ninja Generators now implement the edit_cache target using ccmake(1) if available.
  • The Ninja and NMake Makefiles generators now use the MSVC -external:I flag for system includes. This became available as of VS 16.10 (toolchain version 14.29.30037).
  • The CPack NSIS Generator now requires NSIS 3.03 or later.

New in CMake 3.21.4 (Oct 28, 2021)

  • The Visual Studio 17 2022 generator is now based on the "Visual Studio 2022" release candidates. Previously it was based on preview versions.

New in CMake 3.22.0 RC 1 (Oct 15, 2021)

  • PGP sig by 2D2CEF1034921684

New in CMake 3.21.3 (Sep 21, 2021)

  • PGP sig by 2D2CEF1034921684

New in CMake 3.21.2 (Aug 27, 2021)

  • NEW FEATURES:
  • Presets:
  • cmake-presets(7) gained support for specifying the install prefix in a configure preset.
  • cmake-presets(7) gained support for conditional enabling of presets.
  • cmake-presets(7) gained support for a ${hostSystemName} macro.
  • cmake-presets(7) gained support for omitting the generator and binaryDir fields.
  • Generators:
  • The Visual Studio 17 2022 generator was added. This is experimental and based on "Visual Studio 2022 Preview 3.1" because this version of VS has not been released.
  • The Makefile Generators and the Ninja generator learned to add linker launcher tools along with the linker for C, CXX, OBJC, and OBJCXX languages. See the CMAKE__LINKER_LAUNCHER variable and _LINKER_LAUNCHER target property for details.
  • Languages:
  • CMake learned to support HIP as a first-class language that can be enabled via the project() and enable_language() commands.
  • C_STANDARD, OBJC_STANDARD, and the Compile Features functionality gained support for C17 and C23.
  • Source file extensions .ixx and .cppm are now treated as C++.
  • Command-Line:
  • cmake(1) gained the --install-prefix command-line option to specify the location of the install prefix.
  • cmake(1) gained the --toolchain command-line option to specify a toolchain file.
  • cmake(1) -E capabilities output, for some generators, may now contain a supportedPlatforms field listing platforms known to be supported in CMAKE_GENERATOR_PLATFORM.
  • Messages printed to a terminal now may be colored by message type.
  • Compilers:
  • The Fujitsu compiler is now supported using compiler id Fujitsu in traditional (Trad) mode, and compiler id FujitsuClang in Clang mode.
  • Platforms:
  • CMake now supports the MSYS runtime environment, much like CYGWIN.
  • File-Based API:
  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.3.
  • The cmake-file-api(7) "codemodel" version 2 gained a new "directory" object containing directory-level information. This includes a list of installers generated by the install() command.
  • Commands:
  • The add_custom_command() command DEPFILE option:
  • may now use generator expressions,
  • is now supported by Visual Studio Generators for VS 2012 and above, and
  • is now supported by the Xcode generator.
  • The add_custom_command(TARGET) command (for Build Events) gained support for resolving target-dependent generator expressions.
  • The build_command() command gained a PARALLEL_LEVEL option.
  • The file(COPY_FILE) command was added to copy a single file.
  • The file(GET_RUNTIME_DEPENDENCIES) command gained new POST_INCLUDE_FILES and POST_EXCLUDE_FILES arguments.
  • The file(REAL_PATH) command gained the option EXPAND_TILDE to replace any leading tilde with the path to the user's home directory.
  • The file(RENAME) command learned to optionally capture failure in a result variable. It also gained a NO_REPLACE option to fail if the destination exists.
  • The install() command gained a new IMPORTED_RUNTIME_ARTIFACTS mode, which can be used to install the runtime artifacts of imported targets.
  • The install() command gained a new RUNTIME_DEPENDENCY_SET mode, which can be used to install runtime dependencies using file(GET_RUNTIME_DEPENDENCIES).
  • The install(TARGETS) command gained new RUNTIME_DEPENDENCIES and RUNTIME_DEPENDENCY_SET arguments, which can be used to install runtime dependencies using file(GET_RUNTIME_DEPENDENCIES).
  • The install(SCRIPT|CODE) command supports a new option ALL_COMPONENTS which allows the corresponding code to run for every component of a per component installation.
  • The project() command now sets variables PROJECT_IS_TOP_LEVEL and _IS_TOP_LEVEL to indicate whether it was called in a top-level CMakeLists.txt file.
  • Variables:
  • The CMAKE_TOOLCHAIN_FILE environment variable was added to provide a default value for the CMAKE_TOOLCHAIN_FILE variable.
  • Properties:
  • The IMPORTED_TARGETS directory property was added to get a list of Imported Targets created in the current directory.
  • The XCODE_EMBED_APP_EXTENSIONS target property was added to tell the Xcode generator to embed app extensions such as iMessage sticker packs. Aspects of the embedding can be customized with the XCODE_EMBED_APP_EXTENSIONS_PATH, XCODE_EMBED_APP_EXTENSIONS_CODE_SIGN_ON_COPY and XCODE_EMBED_APP_EXTENSIONS_REMOVE_HEADERS_ON_COPY properties.
  • Modules:
  • The FindBLAS and FindLAPACK modules learned to support the serial Fujitsu_SSL2 and parallel Fujitsu_SSL2BLAMP libraries.
  • The FindDevIL module now provides imported targets.
  • The FindIconv module now has version support.
  • The FindIntl module now has version support.
  • The FindMPI module learned to support Fujitsu and FujitsuClang in both host and cross compiling modes.
  • The FindMsys module was added to find MSYS installations. Like FindCygwin, it is used automatically by some other find modules to locate UNIX-style tools on Windows.
  • The FindOpenMP module learned to support Fujitsu and FujitsuClang.
  • The FindVulkan module gained imported targets Vulkan::Headers and Vulkan::glslangValidator.
  • The UseJava module command add_jar gained a RESOURCES option to allow explicit naming of resources with non-optional namespace.
  • The UseSWIG module use now standard library naming conventions for the CSharp language. See policy CMP0122.
  • The UseSWIG module now supports using the swig tool to generate implicit dependencies with the Xcode generator.
  • Generator Expressions:
  • A new TARGET_RUNTIME_DLLS generator expression was added.
  • CTest:
  • ctest(1) gained documentation for its ability to capture Additional Test Measurements.
  • ctest(1) learned to recognize files attached to a test at run time. Previously it was only possible to attach files to tests at configure time by using the ATTACHED_FILES or ATTACHED_FILES_ON_FAIL test properties. See Additional Test Measurements for more information.
  • ctest(1) gained a --output-junit option to write test results to a JUnit XML file.
  • The ctest_build() command gained a PARALLEL_LEVEL option.
  • CPACK:
  • The CPack DragNDrop Generator gained option CPACK_DMG_FILESYSTEM to control the .dmg filesystem.
  • The CPack IFW Generator now supports hyphens in names given to cpack_ifw_configure_component() or cpack_ifw_configure_component_group() as DEPENDS or DEPENDENCIES arguments. This requires QtIFW 3.1 or later.
  • The CPack NSIS Generator gained a new CPACK_NSIS_EXECUTABLE variable to specify the makensis executable to use instead of the default one.
  • The CPACK_CUSTOM_INSTALL_VARIABLES variable was added to set variables in cmake_install.cmake script invocations made by CPack.
  • DEPRECATED AND REMOVED FEATURES:
  • Undocumented CMAKE_SYSTEM_NAME version-stripping behavior has been removed entirely. If it is set by a -D flag or by a toolchain file, it is left unaltered, even if it still contains a version number. Similar CMAKE_HOST_SYSTEM_NAME version-stripping behavior, also undocumented, has been moved earlier, before project() or enable_language() is called.
  • ARMClang cpu/arch compile and link flags are no longer added automatically based on the CMAKE_SYSTEM_PROCESSOR variable or the undocumented CMAKE_SYSTEM_ARCH variable. They must be specified explicitly. See policy CMP0123.
  • OTHER CHANGES:
  • The find_file(), find_path(), find_program(), and find_library() commands handle cache variables in the same way regardless how they are defined. See policy CMP0125 for details.
  • The find_file(), find_path(), find_program(), and find_library() commands gained the option NO_CACHE to store find result in normal variable.
  • The foreach() command now isolates loop variables in the loop scope. See policy CMP0124 for details.
  • The list() command's GET, INSERT, SUBLIST, and REMOVE_AT subcommands now error with invalid (i.e., non-integer) values are given as any of their index arguments based on the setting of policy CMP0121.
  • The set(CACHE) command no longer removes a normal variable of the same name, if any. See policy CMP0126.
  • target_link_libraries() calls referencing object libraries via the TARGET_OBJECTS generator expression now place the object files before all libraries on the link line, regardless of their specified order. See documentation on Linking Object Libraries via $ for details.
  • The Ninja Generators now pass source files and include directories to the compiler using absolute paths. This makes diagnostic messages and debug symbols more consistent, and matches the Makefile Generators.
  • The NMake Makefiles generator now encodes the generated makefiles as UTF-8 with a BOM when using nmake from VS 9 or above.
  • The Visual Studio Generators for VS 2010 and above now place per-source preprocessor definitions after target-wide preprocssor definitions. This makes VS consistent with the Ninja Generators and the Makefile Generators.
  • The precompiled binaries provided on cmake.org now support liblzma multi-threading. See the CPACK_THREADS and CPACK_ARCHIVE_THREADS variables.
  • UPDATES:
  • Changes made since CMake 3.21.0 include the following.
  • 3.21.1:
  • The Visual Studio 17 2022 generator is now based on "Visual Studio 2022 Preview 2". Previously it was based on "Preview 1.1".
  • 3.21.2:
  • CUDA targets with CUDA_SEPARABLE_COMPILATION enabled are now correctly generated in non-root directories.
  • The Visual Studio 17 2022 generator is now based on "Visual Studio 2022 Preview 3.1". Previously it was based on "Preview 2".

New in CMake 3.20.5 (Jun 22, 2021)

  • Brad King (7):
  • gitlab-ci: update macOS jobs to use Xcode 12.5
  • cmGlobalVisualStudio10Generator: Move static functions to anonymous namespace
  • cmGlobalVisualStudio10Generator: Adopt GetVSInstanceVersion method
  • VS: Do not apply '/external:W*' flag table mapping on VS < 16.10
  • Tests: Fix xcode version detection for Xcode 13 on ARM
  • Help: Add 3.20 release note section for 3.20.{3,4,5}
  • CMake 3.20.5
  • Craig Scott (1):
  • ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutions
  • Kyle Edwards (1):
  • CMake: Allow override of unexpected non-flow-control commands

New in CMake 3.20.4 (Jun 15, 2021)

  • Ben Boeckel (1):
  • ci: use consistent sccache builds
  • Brad King (8):
  • VS: Add special case for '-T version=14.29.16.10' under VS 16.10
  • VS: Add flag table entries for '/external:W*' flags in VS 16.10
  • gitlab-ci: Update Windows builds to MSVC 19.29-16.10 toolset
  • Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule
  • presets: Fix buildPreset "jobs" field test case
  • IRSL: Add Intel oneAPI redist location on Windows
  • fileapi: Fix codemodel-v2 link command fragment relative paths
  • CMake 3.20.4
  • John Drouhard (1):
  • FindBoost: Add check for json component header in Boost 1.75+
  • Marc Chevrier (1):
  • Help: cmake_path: fix erroneous example for IS_PREFIX
  • Raul Tambre (2):
  • MSVC: C++20 final flag, C++23 support
  • Clang/MSVC: C++20 final flag, C++23 support
  • Sam Freed (2):
  • presets: Fix buildPreset "jobs"
  • presets: Fix buildPreset "targets" not allowing a single string

New in CMake 3.20.0 (Mar 24, 2021)

  • New Features:
  • Presets:
  • "cmake-presets(7)" gained support for build and test presets.
  • Generators:
  • Makefile Generators, for some toolchains, now use the compiler to extract implicit dependencies while compiling source files.
  • Languages:
  • C++23 compiler modes may now be specified via the "CXX_STANDARD", "CUDA_STANDARD", or "OBJCXX_STANDARD" target properties, or via the "Compile Features" functionality’s "cxx_std_23" meta-feature.
  • "CUDA" language support now works when "nvcc" is a symbolic link, for example due to a "ccache" or "colornvcc" wrapper script.
  • The "CUDAARCHS" environment variable was added for initializing "CMAKE_CUDA_ARCHITECTURES". Useful in cases where the compiler default is unsuitable for the machine’s GPU.
  • Compilers:
  • The NVIDIA HPC SDK compilers are now supported with compiler id "NVHPC".
  • The Intel oneAPI NextGen LLVM compilers are now supported with compiler id "IntelLLVM":
  • The "icx"/"icpx" C/C++ compilers on Linux, and the "icx" C/C++ compiler on Windows, are fully supported as of oneAPI 2021.1.
  • The "ifx" Fortran compiler on Linux is partially supported. As of oneAPI 2021.1, "ifx" does not define several identification macros, so CMake identifies it as the classic "Intel" compiler. This works in many cases because "ifx" accepts the same command line parameters as "ifort". A future version of oneAPI may fix this.
  • The "ifx" Fortran compiler on Windows is not yet supported.
  • The Intel oneAPI Classic compilers ("icc", "icpc", and "ifort") continue to be supported with compiler id "Intel".
  • Support was added for the IAR STM8 compiler.
  • Platforms:
  • CMake’s support for Cross Compiling for Android is now merged with the Android NDK’s toolchain file. They now have similar behavior, though some variable names differ. User-facing changes include:
  • "find_*" functions will search NDK ABI / API specific paths by default.
  • The default "CMAKE_BUILD_TYPE" for Android is now "RelWithDebInfo".
  • The "CMAKE_ANDROID_NDK_VERSION" variable was added to report the version of the NDK.
  • File-Based API:
  • The "cmake-file-api(7)" gained a new “toolchains” object kind that describes the compiler used for each enabled language.
  • Commands:
  • "add_custom_command()" and "add_custom_target()" now support "generator expressions" in their "OUTPUT" and "BYPRODUCTS" options.
  • Their "COMMAND", "WORKING_DIRECTORY", and "DEPENDS" options gained support for new generator expressions "" and "" that control cross-config handling when using the "Ninja Multi-Config" generator.
  • The "add_custom_command()" command gained "DEPFILE" support on Makefile Generators.
  • The "add_library()" command previously prohibited imported object libraries when using potentially multi-architecture configurations. This mostly affected the "Xcode" generator, e.g. when targeting iOS or one of the other device platforms. This restriction has now been removed.
  • The "cmake_path()" command was added for operations on filesystem paths.
  • The "configure_file()" command gained "USE_SOURCE_PERMISSIONS" and "FILE_PERMISSIONS" options to support copying of permissions of the source file and using specified permissions respectively.
  • The "file(GENERATE)" command gained a "NEWLINE_STYLE" option to specify how newlines are handled for the generated file.
  • The "file(GENERATE)" command gained "NO_SOURCE_PERMISSIONS", "USE_SOURCE_PERMISSIONS", and "FILE_PERMISSIONS" options for controlling the permissions of the generated file.
  • The "install(FILES)" command "RENAME" option learned to support "generator expressions".
  • The "target_include_directories()" command gained a new option "AFTER".
  • The "target_sources()" command now supports targets created by the "add_custom_target()" command.
  • The "try_run()" command gained a "WORKING_DIRECTORY" option to set the working directory in which to run the compiled check executable.
  • Variables:
  • The "CMAKE__BYTE_ORDER" variable was added to provide the target architecture byte order detected from the toolchain.
  • The "CMAKE_RUNTIME_OUTPUT_DIRECTORY", "CMAKE_LIBRARY_OUTPUT_DIRECTORY", and "CMAKE_ARCHIVE_OUTPUT_DIRECTORY" variables now support target-dependent generator expressions.
  • Properties:
  • The "_CLANG_TIDY" target property and the associated "CMAKE__CLANG_TIDY" variable learned to support the "OBJC" and "OBJCXX" languages.
  • The "EXPORT_COMPILE_COMMANDS" target property was added for the associated "CMAKE_EXPORT_COMPILE_COMMANDS" variable to allow for configuration of exporting compile commands per target.
  • The "GENERATED" source-file property is now visible from any directory scope, regardless of the scope in which it is set. See policy "CMP0118".
  • The "UNITY_BUILD_UNIQUE_ID" target property was added to support generation of an identifier that is unique per source file in unity builds. It can help to resolve duplicate symbol problems with anonymous namespaces.
  • The "WIN32_EXECUTABLE" target property now works with Clang on Windows.
  • The "XCODE_EMBED_FRAMEWORKS" target property was added to tell the "Xcode" generator to embed frameworks. Aspects of the embedding can be customized with the "XCODE_EMBED_FRAMEWORKS_PATH", "XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY", and "XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY" target properties.
  • Modules:
  • The "ExternalData" module "ExternalData_Add_Target()" function gained a "SHOW_PROGRESS " option for controlling whether or not to show progress output during the build.
  • The "ExternalProject" module "ExternalProject_Add()" function gained a "CONFIGURE_HANDLED_BY_BUILD" option. This can be used to make subsequent runs of the configure step be triggered by the build step when an external project dependency rebuilds instead of always re- running the configure step in such cases.
  • The "FindBoost" module gained a "Boost_NO_WARN_NEW_VERSIONS" option to silence the warning about unknown dependencies for new Boost versions.
  • The "FindCUDAToolkit" module gained support for finding CUDA toolkits when "nvcc" is a symbolic link, for example due to a "ccache" or "colornvcc" wrapper script.
  • The "FindGDAL" module has been improved to document and mark as advanced its cache variables. There is a new "FindGDAL_SKIP_GDAL_CONFIG" variable which may be used to skip over the "gdal-config"-based search. Users may also set "GDAL_ADDITIONAL_LIBRARY_VERSIONS" to add additional versions to the library name search strategy.
  • The "FindIntl" module now provides an imported target.
  • The "FindOpenSSL" module learned to support a version range.
  • The "FindPython3", "FindPython2" and "FindPython" modules gained options controlling how unversioned interpreter names are searched.
  • The "UseJava" module "add_jar()" command’s "GENERATE_NATIVE_HEADERS" feature gained options to export the generated target.
  • The "UseSWIG" module gained the capability, for Makefile and Ninja generators, to use the "swig" tool to generate implicit dependencies.
  • Autogen:
  • The AUTOMOC feature now works with per-config sources.
  • CTest
  • "ctest(1)" gained a "--test-dir" option to specify the directory in which to look for tests.
  • CPack:
  • "CPack" gained the "CPACK_THREADS" variable to control the number of threads used for parallelized operations, such as compressing the installer package.
  • The "CPack DEB Generator" learned a new "CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS" variable to specify additional search directories for resolving private library dependencies when using "dpkg-shlibdeps".
  • The "CPack IFW Generator" gained a new "CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST" variable to control visibility of the widget listing installer pages on the left side of the wizard. This feature available only since QtIFW 4.0.
  • The "CPack NSIS Generator" gained new "CPACK_NSIS_BRANDING_TEXT" and "CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION" variables to change the text at the bottom of the install window and change its trim position
  • The "CPack NSIS Generator" now correctly handles Unicode characters. If you want to have a "CPACK_RESOURCE_FILE_LICENSE" with UTF-8 characters, it needs to be encoded in UTF-8 BOM.
  • The "CPack NuGet Generator" gained options:
  • "CPACK_NUGET_PACKAGE_ICON" and "CPACK_NUGET__PACKAGE_ICON" allow package icons to be specified by local files.
  • "CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION" and "CPACK_NUGET__PACKAGE_LICENSE_EXPRESSION" add support for specifying licenses recognized by the Software Package Data Exchange (SPDX).
  • "CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME" and "CPACK_NUGET__PACKAGE_LICENSE_FILE_NAME" allow licenses to be specified by local files.
  • "CPACK_NUGET_PACKAGE_LANGUAGE" and "CPACK_NUGET__PACKAGE_LANGUAGE" allow the locale for a package to be specified, for example "en_CA".
  • Deprecated and Removed Features:
  • The "cmake-server(7)" mode has been removed. Clients should use the "cmake-file-api(7)" instead.
  • The "WriteCompilerDetectionHeader" module has been deprecated via policy "CMP0120". Projects should be ported away from it.
  • The "TestBigEndian" module has been deprecated in favor of the "CMAKE__BYTE_ORDER" variable.
  • The "AddFileDependencies" module is deprecated. Port projects to use "set_property()" directly.
  • The "CPack NuGet Generator" deprecated some variables to reflect changes in the NuGet specification:
  • "CPACK_NUGET_PACKAGE_ICONURL" and "CPACK_NUGET__PACKAGE_ICONURL" have been deprecated; replace with a reference to a local icon file.
  • "CPACK_NUGET_PACKAGE_LICENSEURL" and
  • "CPACK_NUGET__PACKAGE_LICENSEURL" have been deprecated; replace with a reference to the project’s license file or SPDX license expression.
  • Other Changes:
  • Source file extensions must now be explicit. See policy "CMP0115" for details.
  • The "LANGUAGE" source file property now forces compilation as the specified language. See policy "CMP0119".
  • On AIX, installation of XCOFF executables and shared libraries no longer requires relinking to change the runtime search path from the build-tree RPATH to the install-tree RPATH. CMake now edits the XCOFF binaries directly during installation, as has long been done on ELF platforms.
  • With MSVC-like compilers the value of "CMAKE_CXX_FLAGS" no longer contains the "/GR" flag for runtime type information by default. See policy "CMP0117".
  • Ninja generators now transform the "DEPFILE" generated by an "add_custom_command()". See policy "CMP0116" for details.
  • The precompiled Linux binaries provided on cmake.org have changed their naming pattern to "cmake-$ver-linux-$arch", where "$arch" is either "x86_64" or "aarch64".
  • The precompiled Windows binaries provided on cmake.org have changed their naming pattern to "cmake-$ver-windows-$arch", where "$arch" is either "x86_64" or "i386".

New in CMake 3.19.7 (Mar 16, 2021)

  • Brad King (6):
  • Revert "Cray: Fix Cray compiler detection on new platforms"
  • Xcode: Restore support for spaces in framework names
  • cmGlobalVisualStudioVersionedGenerator: Clarify local variable name
  • VS: Fix '-T version=14.28' under VS 16.9
  • VS: Accept and translate '-T version=' values with three components
  • CMake 3.19.7
  • Justin LaPolla (1):
  • Cray: Enable Cray compiler wrapper detection on all platforms

New in CMake 3.19.6 (Feb 25, 2021)

  • Brad King (3):
  • Intel: Make explicit Fortran preprocessing under Ninja more robust
  • Tests: Update for upstream ninja change to write status on stderr
  • CMake 3.19.6
  • Kyle Edwards (1):
  • CMakePresets.json: Remove undocumented support for comments
  • Marc Chevrier (1):
  • FindPython: fix erroneous variable handling

New in CMake 3.19.5 (Feb 16, 2021)

  • Brad King (7):
  • Apple: Fix linking to frameworks that do not exist until build time
  • FindBoost: Add support for Boost 1.75
  • Help: Restore docs that find_library considers LIB, not INCLUDE
  • LexerParser: Do not override existing _POSIX_C_SOURCE definition
  • CTest: Restore running dashboard client Test step with modified files
  • Clang: Use -imsvc for system include only with MSVC-like front-end
  • CMake 3.19.5
  • Craig Scott (4):
  • cmComputeLinkInformation: Fix misspelt private variable name
  • Xcode: Don't hard-code SDK-provided implicit framework search paths
  • IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)
  • Help: Add 3.19.5 release notes for Xcode iOS-related changes
  • Robert Maynard (1):
  • FindCUDAToolkit: Restore use of CUDA_PATH environment variable
  • Yauheni Khnykin (1):
  • FindXCTest: Fix output directory for test bundle with new build system

New in CMake 3.19.4 (Jan 31, 2021)

  • Ben Boeckel (2):
  • FindHDF5: avoid writing to the output when testing h5cc
  • FindHDF5: silence STATUS messages when found with QUIET
  • Bianca van Schaik (2):
  • GetPrerequisites: Include weak macOS dependencies
  • file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected
  • Brad King (5):
  • ci: speed up cmake and ninja downloads on Windows
  • ci: download WiX on Windows
  • Intel: Replace deprecated Fortran flag -nofor_main with -nofor-main
  • Help: Add Ninja Multi-Config to list in GENERATOR_IS_MULTI_CONFIG
  • CMake 3.19.4
  • Kelly Walker (1):
  • IRSL: Install msvcp${v}${d}_atomic_wait.dll if available with CRT
  • Marc Chevrier (1):
  • Restore support for cross-compiling CMake itself
  • jonathan molinatto (1):
  • VS: Generalize Win10 max SDK version to all VS generators

New in CMake 3.19.3 (Jan 14, 2021)

  • Brad King (14):
  • cmSystemTools: Revert use of MOVEFILE_WRITE_THROUGH by RenameFile on Windows
  • Tests: Fix ConfigSources test with empty CMAKE_BUILD_TYPE
  • gitlab-ci: consolidate Linux release package job spec for x86_64
  • Help: Add 3.19.3 release note for Linux aarch64 binary
  • gitlab-ci: update macOS jobs to use Xcode 12.3
  • cmGlobalXCodeGenerator: Adopt pbxproj object id generation
  • cmGlobalXCodeGenerator: Add infrastructure for deterministic object ids
  • Xcode: Use deterministic object ids for script build phases
  • gitlab-ci: update upload jobs to go to cmake.org
  • cmake-gui: Fix macOS styling for binaries distributed with Qt 5.10+
  • Utilities/Release: Fix macOS Qt 5.9 build script umask
  • Utilities/Release: Add script to build Qt 5.15.2 macOS universal binaries
  • ci: build separate macOS packages for macOS 10.13+ and macOS 10.10+
  • CMake 3.19.3
  • Craig Scott (2):
  • Help: Fix Sphinx not recognising list in XCODE_LINK_BUILD_PHASE_MODE
  • FetchContent: Relative SOURCE_DIR override cannot be a hard error
  • Eduard Valeyev (1):
  • FindMPI: remove single quotes from include path
  • Hi Key (2):
  • Utilities/Release: Add docker specs for Linux aarch64 binaries
  • gitlab-ci: add jobs to make Linux release packages for aarch64 on 3.19 branch
  • Kris Thielemans (1):
  • FindHDF5: Fix finding both debug and release libs
  • Kyle Edwards (1):
  • cmake-gui: Restore linking of Qt resources
  • Raul Tambre (1):
  • cmMakefile: Don't expand bracket arguments in --trace-expand

New in CMake 3.19.2 (Jan 14, 2021)

  • Adam Weisi (1):
  • Compiler/TI: Fix C standard flags in C-only project
  • Asit Dhal (1):
  • execute_process: Improve COMMAND_ERROR_IS_FATAL error capture scenarios
  • Ben Boeckel (3):
  • FindHDF5: improve error messages when a location variable isn't known
  • FindHDF5: support the hdf5hl_fortran-based variable names
  • FindPython2: avoid doubling the extension in CPython2 SOABI
  • Brad King (28):
  • Tests: Add CMake_TEST_Java option to control Java tests
  • Tests: Teach RunCMake to ignore Xcode install_name_tool signature warnings
  • gitlab-ci: update macOS jobs to use Xcode 12.2
  • Tests: Fix RunCMake.Check* conditions for enabling Fortran
  • Check*: Tolerate variables set with names of languages
  • Ninja: Clean metadata after regen during build on Windows with 1.10.2+
  • ci: update to use ninja 1.10.2
  • Tests: Look for Visual Studio only on Windows hosts
  • CMakeDetermineCompilerId: Filter IAR-AVR format INFO strings earlier
  • CMakeDetermineCompilerId: Add whitespace to clarify logic
  • CMakeDetermineCompilerId: Tolerate stray text around INFO strings
  • Revert "Intel: Add Intel Clang compiler identification"
  • Revert "Intel: Add Intel DPC++ compiler identification"
  • Tests: Add cache entry to control XCTest deployment target
  • Tests: Remove outdated exclusion of tests on OS X 10.3
  • ci: Hard-code XCTest deployment target to 10.15
  • Utilities/Release: Add script to build Qt 5.9.9 macOS universal binaries
  • ci: update to pre-built Qt 5.9.9 universal binaries for macOS packages
  • ci: do not use sccache for macOS packaging
  • ci: update macOS package to produce universal binaries
  • macOS: Offer control over host architecture on Apple Silicon hosts
  • Tests: Cover macOS host architecture selection on Apple Silicon hosts
  • cmake: Clear INSTALL file properties between runs
  • macOS: Add /opt/homebrew to CMAKE_SYSTEM_PREFIX_PATH on Apple Silicon
  • Ninja: Remove cleandead on regeneration
  • Utilities/Release: Update macOS Qt 5.9 build for platform versioning
  • cmake-gui: Restore completion during path editing
  • CMake 3.19.2
  • Craig Scott (4):
  • Help: xref variable that cmake_minimum_required() sets
  • Help: Mention how OPTIMIZE_DEPENDENCIES is initialized
  • Help: Re-sort indexes in the manuals
  • Help: Clarify scope details of deferred call ids for cmake_language()
  • Cristian Adam (1):
  • PCH: Fix compiler errors on iOS multi-arch using Ninja Multi-Config
  • Deniz Bahadir (1):
  • export: Do not fail generation for separate namelink only case
  • Justin LaPolla (1):
  • Cray: Fix Cray compiler detection on new platforms
  • Marc Chevrier (3):
  • FPHSA: ensure it can be used outside 'find_package'
  • Clang on Windows: 'LINKER:' prefix must be honored
  • CMakePackageConfigHelpers: Relax restrictions on version range
  • Raul Tambre (2):
  • CUDA: Fix user-set architectures during detection with Visual Studio
  • macOS: Add architecture flags only for native ASM dialect
  • Robert Maynard (7):
  • Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}Flag
  • ISPC: Ninja properly compute ISPC_HEADER_DIRECTORY location
  • ISPC: Handle OBJECT sources in different directories
  • Document CMP0112 covers $
  • ISPC: Treat system includes as '-I' includes
  • FindGLUT: Handle Mojave and Big Sur 'tbd' framework files
  • ISPC: Generated Headers suffix configurable with a better default
  • Sam Freed (1):
  • Help: Fix presets typo (longDescription to displayName)
  • Stephen Kelly (1):
  • QNX: Do not disable compiler extensions for CMake itself
  • Thomas Bernard (2):
  • llvm-rc: Force C language for the clang gnu frontend
  • llvm-rc: Add CMAKE_VFS_OVERLAY to the preprocessing flags

New in CMake 3.19.1 (Nov 25, 2020)

  • Brad King (10):
  • ci: update to use CMake 3.19.0
  • gitlab-ci: update macOS jobs to use Xcode 12.0
  • Revert “specify language flag when source LANGUAGE property is set”
  • FindGTest: Revert “Allow either “Debug” or “Release” configurations.”
  • Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule
  • Xcode: Fix custom command work-dir placeholders in “new build system”
  • Tests: Match RunCMake.CMP0111 stderr more strictly
  • cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries
  • cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library
  • CMake 3.19.1
  • Kyle Edwards (1):
  • cmGlobalGenerator: FindMakeProgram() at a generator-specific time
  • Marc Chevrier (1):
  • cmFileTime: Fix overflow on time computation
  • Nikita Nemkin (1):
  • Help: Fix ‘… versionadded’ directives for CTEST_CUSTOM_* variables
  • Raul Tambre (2):
  • CUDA: Clang CUDA 11.1 support
  • CUDA: Error if can’t determine toolkit library root

New in CMake 3.19.0 (Nov 20, 2020)

  • New Features:
  • Presets:
  • cmake(1) and cmake-gui(1) now recognize CMakePresets.json and CMakeUserPresets.json files (see cmake-presets(7)).
  • Generators:
  • The Xcode generator now uses the Xcode “new build system” when generating for Xcode 12.0 or higher. See the CMAKE_XCODE_BUILD_SYSTEM variable. One may use -T buildsystem=1 to switch to the legacy build system.
  • The Xcode generator gained support for linking libraries and frameworks via the Link Binaries With Libraries build phase instead of always by embedding linker flags directly. This behavior is controlled by a new XCODE_LINK_BUILD_PHASE_MODE target property, which is initialized by a new CMAKE_XCODE_LINK_BUILD_PHASE_MODE variable.
  • The Visual Studio Generators for VS 2015 and above gained support for the Visual Studio Tools for Android. One may now set CMAKE_SYSTEM_NAME to Android to generate .vcxproj files for the Android tools.
  • Languages:
  • CMake learned to support ISPC as a first-class language that can be enabled via the project() and enable_language() commands. ISPC is currently supported by the Makefile Generators and the Ninja generator on Linux, macOS, and Windows using the Intel ISPC compiler.
  • CUDA language support for Clang now includes:
  • separable compilation (CUDA_SEPARABLE_COMPILATION), and
  • finding scattered toolkit installations when cross-compiling.
  • CUDA language support now works on QNX.
  • File-Based API:
  • The cmake-file-api(7) “codemodel” version 2 version field has been updated to 2.2.
  • The cmake-file-api(7) “codemodel” version 2 “target” object gained a new languageStandard field in the compileGroups objects.
  • Command-Line:
  • The cmake(1) command-line tool’s --install mode gained a --default-directory-permissions option.
  • cmake(1) gained a -E create_hardlink command-line tool that can be used to create hardlinks between files.
  • GUI:
  • The CMake GUI now has an environment variable editor.
  • Commands:
  • The add_test() command now (officially) supports whitespace and other special characters in the name for the test it creates. See policy CMP0110.
  • The cmake_language() command gained a DEFER mode to schedule command calls to occur at the end of processing a directory.
  • The configure_file() command gained a NO_SOURCE_PERMISSIONS option to suppress copying the input file’s permissions to the output file.
  • The execute_process() command gained a COMMAND_ERROR_IS_FATAL option to specify a fatal error.
  • The file(ARCHIVE_CREATE) command gained a COMPRESSION_LEVEL option to specify the compression level.
  • The file(CHMOD) and file(CHMOD_RECURSE) subcommands were added to set permissions of files and directories.
  • The file(DOWNLOAD) command argument is now optional. If it is not specified, the file is not saved.
  • The file(GENERATE) command gained a new TARGET keyword to support resolving target-dependent generator expressions.
  • The file() command gained a new REAL_PATH sub-command to compute a path with symlinks resolved.
  • The find_package() command learned to handle a version range.
  • The separate_arguments() command gained a new PROGRAM option. It allows the arguments to be treated as a program invocation and will resolve the executable to a full path if it can be found.
  • The DIRECTORY option of the set_property(), get_property(), and get_directory_property() commands now accepts references to binary directory paths, such as the value of CMAKE_CURRENT_BINARY_DIR.
  • The string() command gained a set of new JSON sub commands that provide JSON parsing capabilities.
  • Variables:
  • The CMAKE_CLANG_VFS_OVERLAY variable was added to tell Clang to use a VFS overlay to support the Windows SDK when cross-compiling from hosts with case-sensitive filesystems.
  • The CMAKE_MFC_FLAG variable now supports generator expressions.
  • The CMAKE_OPTIMIZE_DEPENDENCIES variable was added to initialize the new OPTIMIZE_DEPENDENCIES target property and avoid unnecessarily building dependencies for a static library.
  • The CMAKE_PCH_INSTANTIATE_TEMPLATES variable was added to initialize the new PCH_INSTANTIATE_TEMPLATES target property.
  • The CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM variable was added to tell the Visual Studio Generators what maximum version of the Windows SDK to choose.
  • Properties:
  • The EXCLUDE_FROM_ALL target property now supports generator expressions.
  • The OPTIMIZE_DEPENDENCIES target property was added to avoid unnecessarily building dependencies for a static library.
  • The PCH_INSTANTIATE_TEMPLATES target property was added to enable template instantiation in the precompiled header. This is enabled by default and may significantly improve compile times. Currently only supported for Clang (version 11 or later).
  • The WIN32_EXECUTABLE target property now supports generator expressions.
  • Modules:
  • The CheckCompilerFlag module has been added to generalize CheckCCompilerFlag and CheckCXXCompilerFlag to more languages. It also supports the CUDA and ISPC languages.
  • The CheckLinkerFlag module now supports the CUDA language.
  • The CheckSourceCompiles module has been added to generalize CheckCSourceCompiles and CheckCXXSourceCompiles to more languages. It also supports the CUDA and ISPC languages.
  • The CheckSourceRuns module has been added to generalize CheckCSourceRuns and CheckCXXSourceRuns to more languages. It also supports the CUDA language.
  • The CMakePackageConfigHelpers module gained support for version ranges.
  • The FindCUDAToolkit module gained support for finding CUDA toolkits that do not contain nvcc, as well as for finding scattered toolkit installations when cross-compiling.
  • The FindPackageHandleStandardArgs module learned to handle version ranges. It also gained the find_package_check_version() command to check the validity of a version against version-related arguments of find_package() command.
  • The FindPython3, FindPython2 and FindPython modules gained the ability to handle a version range.
  • The FindPython3, FindPython2 and FindPython modules provide, respectively, the variable Python3_LINK_OPTIONS, Python2_LINK_OPTIONS and Python_LINK_OPTIONS for link options.
  • The FindSDL module now provides:
  • An imported target SDL::SDL.
  • Result variables SDL_LIBRARIES and SDL_INCLUDE_DIRS.
  • Version variables SDL_VERSION, SDL_VERSION_MAJOR, SDL_VERSION_MINOR, and SDL_VERSION_PATCH.
  • The FindSWIG module gained the ability to handle a version range.
  • The FindTIFF module gained a CXX component to find the tiffxx library containing C++ bindings.
  • The FindVulkan module now provides a Vulkan::glslc imported target and associated Vulkan_GLSLC_EXECUTABLE variable which contain the path to the GLSL SPIR-V compiler.
  • The UseSWIG module gained support for new source file properties OUTPUT_DIR and OUTFILE_DIR to manage output directories on a per-source basis.
  • CTest:
  • ctest(1) now supports the CUDA compute-sanitizer checker (previously known as cuda-memcheck) as the CTEST_MEMORYCHECK_COMMAND. The different tools (memcheck, racecheck, synccheck and initcheck) supported by compute-sanitizer can be selected by adding appropriate flags to the CTEST_MEMORYCHECK_COMMAND_OPTIONS variable. The default flags are --tool memcheck --leak-check full.
  • CPack:
  • CPack gained the CPACK_PRE_BUILD_SCRIPTS, CPACK_POST_BUILD_SCRIPTS, and CPACK_PACKAGE_FILES variables.
  • The CPack External Generator gained the CPACK_EXTERNAL_BUILT_PACKAGES variable.
  • The CPack WIX Generator gained a CPACK_WIX_CUSTOM_XMLNS option to specify custom XML namespaces.
  • Other:
  • Interface Libraries may now have source files added via add_library() or target_sources(). Those with sources will be generated as part of the build system.
  • Deprecated and Removed Features:
  • Compatibility with versions of CMake older than 2.8.12 is now deprecated and will be removed from a future version. Calls to cmake_minimum_required() or cmake_policy() that set the policy version to an older value now issue a deprecation diagnostic.
  • An explicit deprecation diagnostic was added for policy CMP0071 (CMP0071 and below were already deprecated). The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that projects should port to the NEW behaviors.
  • macOS SDKs older than 10.5 are no longer supported.
  • cmake-gui(1) now requires Qt5. Support for compiling with Qt4 has been removed.
  • The cmake(1) command-line option --warn-unused-vars has been removed and is now silently ignored. The option has not worked correctly since CMake 3.3.
  • Documentation:
  • The following guides have been added:
  • IDE Integration Guide
  • Importing and Exporting Guide
  • Other Changes:
  • Building for macOS will now use the latest SDK available on the system, unless the user has explicitly chosen a SDK using CMAKE_OSX_SYSROOT. The deployment target or system macOS version will not affect the choice of SDK.
  • The CMAKE__COMPILER variable may now be used to store “mandatory” compiler flags like the CC and other environment variables.
  • The CMAKE__FLAGS_INIT variable will now be considered during the compiler identification check if other sources like CMAKE__FLAGS or CFLAGS are not set.
  • The find_program() command now requires permission to execute but not to read the file found. See policy CMP0109.
  • An imported target missing its location property fails during generation if the location is used. See policy CMP0111.
  • The following target-based generator expressions that query for directory or file name components no longer add a dependency on the evaluated target. See policy CMP0112.
  • TARGET_FILE_DIR
  • TARGET_LINKER_FILE_BASE_NAME
  • TARGET_LINKER_FILE_NAME
  • TARGET_LINKER_FILE_DIR
  • TARGET_SONAME_FILE_NAME
  • TARGET_SONAME_FILE_DIR
  • TARGET_PDB_FILE_NAME
  • TARGET_PDB_FILE_DIR
  • TARGET_BUNDLE_DIR
  • TARGET_BUNDLE_CONTENT_DIR
  • Makefile Generators no longer repeat custom commands from target dependencies. See policy CMP0113.
  • The ExternalProject module handling of step target dependencies has been revised. See policy CMP0114.
  • The OSX_ARCHITECTURES target property is now respected for the ASM language.
  • If CUDA compiler detection fails with user-specified CMAKE_CUDA_ARCHITECTURES or CMAKE_CUDA_HOST_COMPILER, an error is raised.

New in CMake 3.18.3 (Sep 23, 2020)

  • Alexandru Croitor (1):
  • AutoGen: Fix moc and uic dependencies when building Qt itself
  • Ben McMorran (1):
  • foreach: Fix crash parsing integer out of range
  • Brad King (5):
  • gitlab-ci: Prefer MR rules for any pipeline associated with a MR
  • Help: Update 3.18.2 release notes to mention 3.16.9 and 3.17.5
  • gitlab-ci: update macOS jobs to use Xcode 11.7
  • Check*CompilerFlag: Do not set result as a normal variable too
  • CMake 3.18.3
  • Cristian Adam (2):
  • PCH: Mark CMake PCH source files as -x -header
  • PCH: Fix 30s wait for VS2008 when used via -Tv90
  • Joerg Bornemann (2):
  • AutoMoc: Restore support for re-running after project file changes
  • AutoMoc: Re-run moc if a dependency is missing
  • Josef Angstenberger (1):
  • file(GENERATE): Create output file structures for all directories first
  • Kyle Edwards (5):
  • Tests: Pass additional Qt information to Ninja and NMC tests
  • Ninja Multi-Config: Fix clean:all target
  • Ninja Multi-Config: Fix cleaning of utility targets with commands
  • Ninja Multi-Config: Fix dependencies of utility targets
  • Ninja Multi-Config: Fix dependencies of custom commands
  • Malcolm Parsons (1):
  • FindJNI: Add arm64 support
  • Marc Chevrier (4):
  • UseSWIG: Update option -interface usage
  • FindPython: enhance ABI checks against include directory
  • FindPython: CMP0012 must be set to NEW
  • ARMClang: Fix link line generation after addition of armlink support
  • Michael Hirsch (1):
  • FindMatlab: add R2020b => 9.9
  • Raul Tambre (1):
  • MSVC: Record support for c_static_assert
  • Robert Maynard (1):
  • CUDA: Support setting CUDA14/17 when using MSVC
  • Sumit Bhardwaj (1):
  • Implement cm::static_reference_cast by declval

New in CMake 3.18.2 (Aug 21, 2020)

  • Alexandru Croitor (2):
  • AutoGen: Fix over-specified direct dependencies of custom command
  • AutoGen: Add test to check for correct AutoMoc dependencies
  • Axel Huebl (1):
  • FindMPI: Fix regression in pthread guard
  • Ben Boeckel (1):
  • FPHSA: detect inclusion between find modules
  • Brad King (8):
  • Tests: Isolate RunCMake.FindPkgConfig from caller environment
  • FindRuby: Restore compatibility variable RUBY_INCLUDE_PATH
  • Xcode: Explicitly turn off signing in try_compile projects
  • PCH: Avoid Apple-specific architecture flags on other platforms
  • gitlab-ci: add 'cmake' tag to all jobs
  • Tests: Fix RunCMake.try_compile test for C standards with MSVC 19.27
  • gitlab-ci: Update Windows builds to MSVC 19.27
  • CMake 3.18.2
  • Craig Scott (2):
  • ExternalProject: Stop patch target from always appearing out-of-date
  • ExternalProject: Stop configure target from always appearing out-of-date
  • Cristian Adam (1):
  • PCH: Avoid unnecessary 30s delay on MSBuild Generator with REUSE_FROM
  • Daniele E. Domenichelli (1):
  • FindRuby: Add documentation for deprecated variables
  • Joerg Bornemann (2):
  • Autogen: Turn off moc path prefix generation by default
  • Help: Add 3.18.2 release note about AUTOMOC_PATH_PREFIX default change
  • Kyle Edwards (1):
  • Ninja: Restore shorter path to response files
  • Laurits Riple (1):
  • GoogleTest: Restore support for list arguments in TEST_EXECUTOR
  • Marc Chevrier (3):
  • FindPython: ensure user's policies are respected
  • FindPython: manage SOABI for all Python versions
  • FindPython: enhance robustness of version extraction from library name
  • Raul Tambre (1):
  • MSVC: Record support for C11 and c_restrict
  • Robert Maynard (1):
  • CMakeFindBinUtils: Always consider plain binutils when not cross-compiling
  • Seth R Johnson (1):
  • FindHDF5: fix compiler detection when HL is disabled
  • Thomas Bernard (1):
  • llvm-rc: Fix quoting of path to cmake in CMAKE_RC_COMPILE_OBJECT

New in CMake 3.18.1 (Aug 12, 2020)

  • Ben Boeckel (1):
  • gitlab-ci: avoid failing dependent steps
  • Brad King (16):
  • cmGlobalXCodeGenerator: Save CMAKE_SYSTEM_NAME in member
  • Swift: Fix regression in linking to interface libraries
  • Xcode: Explicitly specify default native architecture on macOS
  • bootstrap: Add options to control use of system nghttp2
  • GHS: Fix crash when GHS_NO_SOURCE_GROUP_FILE property is not defined
  • Auxiliary: Add options to control Vim and Emacs file installation
  • cmake-gui: Fix crash when built with Qt 5.14 or later
  • VS: Restore toleration of target-wide -TP flag with MSVC
  • Xcode: Suppress legacy build system deprecation warning
  • Help: Update file(GET_RUNTIME_DEPENDENCIES) prose to match option names
  • FindXalanC: Fix version parsing for XalanC 1.12
  • bootstrap: Fix support for Intel compiler with modern GNU system compiler
  • Compilers: Ignore -print-sysroot prefix when it is '/'
  • add_test: Revert "Allow special characters in test name"
  • Clang: Fix fallback compile features when simulating old MSVC versions
  • CMake 3.18.1
  • Cristian Adam (1):
  • Unity Builds: Do not set SKIP_AUTOGEN to source files
  • Julien Schueller (1):
  • centos5: Fix FTBFS with strdup
  • Kyle Edwards (1):
  • Ninja Multi-Config: Make link response files per-config
  • Mike Gelfand (1):
  • FindCURL: Fix list index check after search
  • Nate Avers (1):
  • ExternalProject: omit --no-checkout from git clone when using git 2.20.x.
  • Stephan Rohmen (2):
  • Graphviz: Restore support for per-target dependency graph options
  • Tests: Cover Graphviz support for per-target dependency graph options

New in CMake 3.17.3 (Jun 29, 2020)

  • Selection of the Objective C or C++ compiler now considers the CC or CXX environment variable if the OBJC or OBJCXX environment variable is not set.
  • The FindPkgConfig module now extracts include directories prefixed with -isystem into the *_INCLUDE_DIRS variables and INTERFACE_INCLUDE_DIRECTORIES target properties. Previously they would be places in *_CFLAGS_OTHER variables and INTERFACE_COMPILE_OPTIONS target properties.

New in CMake 3.17.1 (Jun 29, 2020)

  • CMake 3.17.0 updated the CPack NSIS Generator with changes that require NSIS 3.0 or later. CMake 3.17.1 now enforces the use of a sufficiently new version.

New in CMake 3.17.0 (Jun 29, 2020)

  • New Features:
  • Generators:
  • cmake(1) gained a Ninja Multi-Config generator, which is similar to the Ninja generator but can be used to build multiple configurations at once.
  • Visual Studio Generators learned to support per-config sources. Previously only Command-Line Build Tool Generators supported them.
  • Visual Studio Generators for VS 2010 and above now support specifying the VCTargetsPath value for project files in CMAKE_GENERATOR_TOOLSET setting.
  • Visual Studio Generators for VS 2010 and above learned to support .NET Standard and .NET Core. See the DOTNET_TARGET_FRAMEWORK target property and associated CMAKE_DOTNET_TARGET_FRAMEWORK variable.
  • Languages:
  • The Compile Features functionality now offers meta-features for the CUDA language standard levels (e.g. cuda_std_03, cuda_std_14). See CMAKE_CUDA_KNOWN_FEATURES.
  • Compilers:
  • The IBM XL Fortran compiler is now supported by the Ninja generator.
  • Command-Line:
  • cmake(1) gained a --debug-find command-line option to enable additional human-readable output on where find_* commands search.
  • cmake(1) gained a --trace-format command-line option that can be used to set the --trace output format. Currently, the old human readable and the new JSON format are supported. The new JSON format is easier to parse automatically than the existing format.
  • cmake(1) gained a -E rm command-line tool that can be used to remove directories and files. This supersedes the existing -E remove and -E remove_directory tools and has better semantics.
  • Commands:
  • The add_custom_command() command learned to interpret paths in DEPENDS arguments that are specified relative to the current binary directory.
  • The foreach() command learned a new ZIP_LISTS option to iterate over multiple lists simultaneously.
  • The load_cache(READ_WITH_PREFIX) command mode is now allowed when using cmake -P to Run a Script.
  • The message() command learned to output context provided in the CMAKE_MESSAGE_CONTEXT variable for log levels NOTICE and below. Enable this output with the new --log-context command-line option or CMAKE_MESSAGE_CONTEXT_SHOW variable.
  • The message() command gained new keywords CHECK_START, CHECK_PASS and CHECK_FAIL.
  • The target_compile_options() command now honors the BEFORE keyword more consistently. See policy CMP0101.
  • Variables:
  • A CMAKE_CTEST_ARGUMENTS variable was added to specify a list of command-line arguments passed to CTest when running through the test (or RUN_TESTS) target of the generated build system.
  • The following variables are now defined inside a function()
  • CMAKE_CURRENT_FUNCTION
  • CMAKE_CURRENT_FUNCTION_LIST_DIR
  • CMAKE_CURRENT_FUNCTION_LIST_FILE
  • CMAKE_CURRENT_FUNCTION_LIST_LINE
  • The CMAKE_CUDA_RUNTIME_LIBRARY variable and CUDA_RUNTIME_LIBRARY target property were introduced to select the CUDA runtime library used when linking targets that use CUDA.
  • The CMAKE_FIND_DEBUG_MODE variable was introduced to print extra find_* call information during the cmake run to standard error. Output is designed for human consumption and not for parsing.
  • The CMAKE_EXPORT_COMPILE_COMMANDS variable now takes its initial value from the CMAKE_EXPORT_COMPILE_COMMANDS environment variable if no explicit configuration is given.
  • The CMAKE__COMPILER_LAUNCHER variable, if not set explicitly, now takes its initial value from the CMAKE__COMPILER_LAUNCHER environment variable.
  • The CMAKE_MESSAGE_LOG_LEVEL variable can now be used to persist a log level between CMake runs, unlike the --log-level command line option which only applies to that particular run.
  • The CMAKE_XCODE_SCHEME_ENVIRONMENT variable was added to initialize the XCODE_SCHEME_ENVIRONMENT target property.
  • The CMAKE_XCODE_SCHEME_WORKING_DIRECTORY variable and associated XCODE_SCHEME_WORKING_DIRECTORY target property were added to tell the Xcode generator to set the value of the Custom Working Directory schema option.
  • Properties:
  • The AIX_EXPORT_ALL_SYMBOLS target property and associated CMAKE_AIX_EXPORT_ALL_SYMBOLS variable were created to optionally explicitly disable automatic export of symbols from shared libraries on AIX.
  • The DEPRECATION target property was added to mark a target as deprecated. If a linked target is marked as deprecated, a warning with the deprecation message is issued at generate time.
  • The INSTALL_NAME_DIR target property now supports generator expressions. In particular, the $ generator expression can be used to set the directory relative to the install-time prefix.
  • Target properties MACHO_COMPATIBILITY_VERSION and MACHO_CURRENT_VERSION were added to set the compatibility_version and curent_version, respectively, for Mach-O binaries. For backwards compatibility, if these properties are not set, SOVERSION and VERSION are used respectively as fallbacks.
  • The VS_DOTNET_DOCUMENTATION_FILE target property was added to tell Visual Studio Generators to generate a DocumentationFile reference in .csproj files.
  • Modules:
  • The ExternalProject module ExternalProject_Add() command gained a GIT_SUBMODULES_RECURSE option to specify whether Git submodules should be updated recursively. The default is on to preserve existing behavior.
  • The FindCUDAToolkit module was added to find the CUDA Toolkit without enabling CUDA as a language.
  • The FindCURL module learned to find CURL using the CURLConfig.cmake package configuration file generated by CURL’s cmake buildsystem. It also gained a new CURL_NO_CURL_CMAKE option to disable this behavior.
  • The FindFLEX module’s FLEX_TARGET command now runs flex with CMAKE_CURRENT_BINARY_DIR as the working directory. See policy CMP0098.
  • The FindLibArchive module now provides an imported target for libarchive.
  • The FindPython module has learned to find Python components in active virtual environments managed by conda.
  • The FindPython3 and FindPython modules gained, respectively, variable Python3_SOABI and Python_SOABI giving the standard extension suffix for modules. Moreover, commands Python3_add_library() and Python_add_library() gained the option WITH_SOABI to prefix the library suffix with the value of SOABI.
  • The FindLibXml2 module now provides an imported target for the xmllint executable.
  • Autogen:
  • AUTOMOC and AUTOUIC learned to process headers with a .hh extension. See policy CMP0100.
  • CTest:
  • The CTEST_CONFIGURATION_TYPE variable is now set from the command line when ctest(1) is invoked with -C .
  • The ctest(1) tool gained support for Dr. Memory to run memcheck runs.
  • The ctest(1) tool gained a --no-tests= option to explicitly set and unify the behavior between direct invocation and script mode if no tests were found.
  • The ctest(1) tool gained a --repeat : option to specify conditions in which to repeat tests. This generalizes the existing --repeat-until-fail option to add modes for until-pass and after-timeout.
  • The ctest_test() command gained a REPEAT : option to specify conditions in which to repeat tests.
  • CPack:
  • The CPack DragNDrop Generator learned to use the CPACK_DMG__FILE_NAME variable to set a custom filename when packaging components into their own DMGs.
  • The CPack DragNDrop Generator learned to handle RTF formatted license files. When CPACK_DMG_SLA_DIR variable is set, .license.rtf is considered, but only as a fallback when the plaintext (.txt) file is not found in order to maintain backwards compatibility.
  • The CPack NSIS Generator gained a new variable CPACK_NSIS_MUI_HEADERIMAGE to set the header image. To not break existing setups, it still defaults to CPACK_PACKAGE_ICON if the new variable is not set.
  • The CPack NSIS Generator now supports CPACK_NSIS_UNINSTALL_NAME. This can be used to specify the name of the Uninstall program.
  • The CPack NSIS Generator now supports CPACK_NSIS_WELCOME_TITLE and CPACK_NSIS_WELCOME_TITLE_3LINES. These can be used to specify the welcome page title and display it in 3 lines.
  • The CPack NSIS Generator now supports CPACK_NSIS_FINISH_TITLE and CPACK_NSIS_FINISH_TITLE_3LINES. These can be used to specify the finish page title and display it in 3 lines.
  • The CPack productbuild Generator gained support for a CPACK_PRODUCTBUILD_BACKGROUND variable to specify a background image for the macOS installer.
  • Other:
  • ccmake(1) now displays cache values using colors based on the entry type if the terminal supports color.
  • ccmake(1) now displays messages and a progress bar during configure and generate. It will keep the output displayed if any errors or warnings occurred.
  • Deprecated and Removed Features
  • An explicit deprecation diagnostic was added for policy CMP0068 and policy CMP0069 (CMP0067 and below were already deprecated). The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that projects should port to the NEW behaviors.
  • The CPack PackageMaker Generator generator has been deprecated because Xcode no longer distributes the PackageMaker tools. The undocumented OSXX11 generator has also been deprecated.
  • The cmake(1) command-line -E remove and -E remove_directory tools are deprecated in favor of the new -E rm tool. The older tools always returned 0 if a named path did not exist even without the force option and cannot be fixed without breaking compatibility, and so have been superseded.
  • The CPack NSIS Generator now requires NSIS 3.0 or later.
  • Other Changes:
  • The file API index file now emits a multiConfig flag specifying whether or not the generator supports multiple output configurations.
  • Target link properties INTERFACE_LINK_OPTIONS, INTERFACE_LINK_DIRECTORIES and INTERFACE_LINK_DEPENDS are now transitive over private dependencies on static libraries. See policy CMP0099.
  • When using MinGW tools, the find_library() command no longer finds .dll files by default. Instead, it expects .dll.a import libraries to be available.
  • The MinGW Makefiles generator no longer issues an error if sh.exe is present in the environment’s PATH.
  • The Ninja generator now prefers the first ninja build tool to appear in the PATH no matter whether it is called ninja-build, ninja, or samu. Previously the first of those names to appear anywhere in the PATH would be preferred.
  • With SDCC the sdar tool is now preferred over sdcclib as librarian. The latter was deprecated by SDCC 3.2.0 and removed in SDCC 3.8.6.
  • With SDCC the default flags no longer include any target-specific flags. Previously the default flags were hard-coded for 8051.
  • The CMAKE_VS_GLOBALS variable value now applies during compiler identification and in targets created by the add_custom_target() command.
  • The Xcode generator no longer hard-codes -Wmost, -Wno-four-char-constants, and -Wno-unknown-pragmas warning flags.

New in CMake 3.5.0 (Mar 9, 2016)

  • New Features:
  • GUI:
  • The cmake-gui(1) gained options to control warnings about deprecated functionality.
  • The cmake-gui(1) learned an option to set the toolset to be used with VS IDE and Xcode generators, much like the existing -T option to cmake(1).
  • The cmake-gui(1) gained a Regular Expression Explorer which may be used to create and evaluate regular expressions in real-time. The explorer window is available via the Tools menu.
  • Command-Line:
  • The -Wdev and -Wno-dev cmake(1) options now also enable and suppress the deprecated warnings output by default.
  • The suppression of developer warnings as errors can now be controlled with the new -Werror=dev and -Wno-error=dev cmake(1) options.
  • The cmake(1) -E command-line tools copy, copy_if_different, copy_directory, and make_directory learned to support multiple input files or directories.
  • Commands:
  • The cmake_parse_arguments() command is now implemented natively. The CMakeParseArguments module remains as an empty placeholder for compatibility.
  • The install(DIRECTORY) command learned to support generator expressions in the list of directories.
  • Variables:
  • The CMAKE_ERROR_DEPRECATED variable can now be set using the -Werror=deprecated and -Wno-error=deprecated cmake(1) options.
  • The CMAKE_WARN_DEPRECATED variable can now be set using the -Wdeprecated and -Wno-deprecated cmake(1) options.
  • Properties:
  • The VS_GLOBAL_ target property is now implemented for VS 2010 and above. Previously it worked only in VS 2008 and below.
  • Modules:
  • The ExternalProject module learned a new GIT_REMOTE_NAME option to control the git clone --origin value.
  • The FindBoost module now provides imported targets such as Boost::boost and Boost::filesystem.
  • The FindFLEX module FLEX_TARGET macro learned a new DEFINES_FILE option to specify a custom output header to be generated.
  • The FindGTest module now provides imported targets.
  • The FindGTK2 module, when GTK2_USE_IMPORTED_TARGETS is enabled, now sets GTK2_LIBRARIES to contain the list of imported targets instead of the paths to the libraries. Moreover it now sets a new GTK2_TARGETS variable containing all the targets imported.
  • The FindOpenMP module learned to support Clang.
  • The FindOpenSSL module gained a new OPENSSL_MSVC_STATIC_RT option to search for libraries using the MSVC static runtime.
  • The FindPNG module now provides imported targets.
  • The FindTIFF module now provides imported targets.
  • A FindXalanC module was introduced to find the Apache Xalan-C++ XSL transform processing library.
  • The FindXercesC module now provides imported targets.
  • Platforms:
  • Support was added for the ARM Compiler (arm.com) with compiler id ARMCC.
  • A new platform file for cross-compiling in the Cray Linux Environment to target compute nodes was added. See Cross Compiling for the Cray Linux Environment for usage details.
  • The Compile Features functionality is now aware of features supported by Clang compilers on Windows (MinGW).
  • When building for embedded Apple platforms like iOS CMake learned to build and install combined targets which contain both a device and a simulator build. This behavior can be enabled by setting the IOS_INSTALL_COMBINED target property.
  • CPack:
  • The CPackDMG module learned new variable to specify AppleScript file run to customize appearance of DragNDrop installer folder, including background image setting using supplied PNG or multi-resolution TIFF file. See the CPACK_DMG_DS_STORE_SETUP_SCRIPT and CPACK_DMG_BACKGROUND_IMAGE variables.
  • The CPackDeb module learned to set the optional config file Source field using a monolithic or per-component variable. See CPACK_DEBIAN_PACKAGE_SOURCE.
  • The CPackDeb module learned to set Package, Section and Priority control fields per-component. See variables CPACK_DEBIAN__PACKAGE_SECTION and CPACK_DEBIAN__PACKAGE_PRIORITY.
  • The CPack DragNDrop generator learned to add multi-lingual SLAs to a DMG which is presented to the user when they try to mount the DMG. See the CPACK_DMG_SLA_LANGUAGES and CPACK_DMG_SLA_DIR variables for details.
  • The CPackNSIS module learned new variables to add bitmaps to the installer. See the CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP and CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP variables.
  • The CPackRPM module learned to set Name and Group control fields per-component. See CPACK_RPM__PACKAGE_NAME and CPACK_RPM__PACKAGE_GROUP.
  • Other:
  • Warnings about deprecated functionality are now enabled by default. They may be suppressed with -Wno-deprecated or by setting the CMAKE_WARN_DEPRECATED variable to false.
  • Deprecated and Removed Features:
  • The cmake(1) -E time command now properly passes arguments with spaces or special characters through to the child process. This may break scripts that worked around the bug with their own extra quoting or escaping.
  • The Xcode generator was fixed to escape backslashes in strings consistently with other generators. Projects that previously worked around the inconsistecy with an extra level of backslashes conditioned on the Xcode generator must be updated to remove the workaround for CMake 3.5 and greater.
  • Other Changes:
  • The Visual Studio 14 2015 generator learned to map the /debug:fastlink linker flag to the .vcxproj file property.
  • The FindGTK2 module now configures the GTK2::sigc++ imported target to enable c++11 on its dependents when using sigc++ 2.5.1 or higher.
  • The precompiled Windows binary provided on cmake.org is now a .msi package instead of an installer executable. One may need to manually uninstall CMake versions lower than 3.5 before installing the new package.

New in CMake 3.4.0 (Nov 13, 2015)

  • New Features:
  • Generators:
  • The Visual Studio 14 2015 generator learned to select a Windows 10 SDK based on the value of the CMAKE_SYSTEM_VERSION variable and the SDKs available on the host.
  • CMake learned rudimentary support for the Apple Swift language. When using the Xcode generator with Xcode 6.1 or higher, one may enable the Swift language with the enable_language() command or the project() command (this is an error with other generators or when Xcode is too old). Then one may list .swift source files in targets for compilation.
  • Commands:
  • The find_program() command learned a NAMES_PER_DIR option to consider all given NAMES in each directory before moving on to the next directory.
  • The get_filename_component() command learned a new BASE_DIR subcommand. This is used to specify a base directory when calculating an absolute path from a relative path.
  • The if() command learned a new TEST operator that evaluates to true if a given test name has been defined by the add_test() command. See policy CMP0064.
  • The install(DIRECTORY) command DESTINATION option learned to support generator expressions.
  • The install(FILES) command DESTINATION option learned to support generator expressions.
  • The string() command learned a new APPEND subcommand.
  • Variables:
  • The Makefile Generators and the Ninja generator learned to add compiler launcher tools like distcc and ccache along with the compiler for C and CXX languages. See the CMAKE__COMPILER_LAUNCHER variable and _COMPILER_LAUNCHER target property for details.
  • New CMAKE_LINK_SEARCH_START_STATIC and CMAKE_LINK_SEARCH_END_STATIC variables were introduced to initialize the LINK_SEARCH_START_STATIC and LINK_SEARCH_END_STATIC target properties, respectively.
  • Properties:
  • Visual Studio Generators learned to support additonal target properties to customize projects for NVIDIA Nsight Tegra Visual Studio Edition:
  • ANDROID_ANT_ADDITIONAL_OPTIONS
  • ANDROID_ARCH
  • ANDROID_ASSETS_DIRECTORIES
  • ANDROID_JAR_DEPENDENCIES
  • ANDROID_JAR_DIRECTORIES
  • ANDROID_JAVA_SOURCE_DIR
  • ANDROID_NATIVE_LIB_DEPENDENCIES
  • ANDROID_NATIVE_LIB_DIRECTORIES
  • ANDROID_PROCESS_MAX
  • ANDROID_PROGUARD
  • ANDROID_PROGUARD_CONFIG_PATH
  • ANDROID_SECURE_PROPS_PATH
  • ANDROID_SKIP_ANT_STEP
  • ANDROID_STL_TYPE
  • The ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY target properties learned to support generator expressions.
  • The SOURCE_DIR and BINARY_DIR target properties were introduced to allow project code to query where a target is defined.
  • The OUTPUT_NAME target property and its variants learned to support generator expressions.
  • A TARGET_MESSAGES global property was added to tell the Makefile Generators whether to generate commands to print output after each target is completed.
  • On Windows with MS-compatible tools, CMake learned to optionally generate a module definition (.def) file for SHARED libraries. See the WINDOWS_EXPORT_ALL_SYMBOLS target property.
  • Modules:
  • The ExternalProject module ExternalProject_Add() function GIT_SUBMODULES option now also limits the set of submodules that are initialized in addition to the prior behavior of limiting the set of submodules that are updated.
  • The ExternalProject module learned new USES_TERMINAL arguments for giving steps exclusive terminal access. This is useful with the Ninja generator to monitor CMake superbuild progress and prevent CPU oversubscription.
  • The FindBISON module BISON_TARGET macro learned a new DEFINES_FILE option to specify a custom output header to be generated.
  • The FindHDF5 module learend a new HDF5_PREFER_PARALLEL option allowing users to specify that a parallel HDF5 tool is preferred if both are available.
  • The FindIce module now provides imported targets.
  • The FindJava module learned to optionally find the idlj and jarsigner tools.
  • The FindOpenSSL module now provides imported targets.
  • The FindOpenSSL module learned a new OPENSSL_USE_STATIC_LIBS option to search only for static libraries.
  • The FindPkgConfig learned a new pkg_get_variable() command which may be used to query for arbitrary variables from a package (such as for related tools or data and plugin install paths).
  • The FindProtobuf module gained a new protobuf_generate_python() function to generate python sources from .proto files.
  • The FindTIFF module learned to search separately for debug and release variants.
  • The FindwxWidgets module learned to support version requests.
  • The FindXercesC module learned to search separately for debug and release variants.
  • The FindZLIB module learned to search separately for debug and release variants.
  • The GNUInstallDirs module learned special default values for certain installation prefixes according to the GNU Coding Standards and the Filesystem Hierarchy Standard.
  • The UseJava module add_jar function learned to support response files (e.g. @srcs.txt) for source specification.
  • The UseJava module install_jar function learned new DESTINATION and COMPONENT options to specify the corresponding install() command options.
  • The UseJava module gained a new create_javah function to create C headers from Java classes.
  • Generator Expressions:
  • A new $ generator expression has been added.
  • CTest:
  • CTest learned to optionally measure the CPU load during parallel testing and avoid starting tests that may cause the load to exceed a given threshold. See the ctest(1) command --test-load option, the TestLoad setting of the CTest Test Step, the CTEST_TEST_LOAD variable, and the TEST_LOAD option of the ctest_test() command.
  • ctest(1) learned options --test-output-size-passed and --test-output-size-failed to customize the limit on test output size submitted when running as a Dashboard Client.
  • CPack:
  • The CPackDeb module learned to set package dependencies per component. See variables:
  • CPACK_DEBIAN__PACKAGE_BREAKS
  • CPACK_DEBIAN__PACKAGE_CONFLICTS
  • CPACK_DEBIAN__PACKAGE_ENHANCES
  • CPACK_DEBIAN__PACKAGE_PREDEPENDS
  • CPACK_DEBIAN__PACKAGE_PROVIDES
  • CPACK_DEBIAN__PACKAGE_RECOMMENDS
  • CPACK_DEBIAN__PACKAGE_REPLACES
  • CPACK_DEBIAN__PACKAGE_SUGGESTS
  • The CPack module learned to package empty directories.
  • The CPack module gained a new setting, CPACK_VERBATIM_VARIABLES, which can be used to ensure the cpack program receives the settings’ values exactly as they were set, even if they contain CMake-special characters. For compatibility, it’s off by default.
  • Other:
  • The Compile Features functionality is now aware of features supported by GNU C compilers on Windows.
  • CMake learned to honor *.manifest source files with MSVC tools. Manifest files named as sources of .exe and .dll targets will be merged with linker-generated manifests and embedded in the binary.
  • The Concurrent Fortran 77 compiler is now supported. Its compiler id is CCur.
  • cmake(1) gained a new --trace-expand command line option that is like --trace but expands variable references in the output.
  • Deprecated and Removed Features
  • The CMakeExpandImportedTargets module is now documented as deprecated. See module documentation for an explanation.
  • The CMAKE_USE_RELATIVE_PATHS variable no longer has any effect. Previously it was partially implemented and unreliable.
  • Other Changes:
  • The CheckFunctionExists, CheckLibraryExists, CheckSymbolExists, and FindThreads modules learned to work in environments where only CXX is enabled.
  • The CPackDeb module now correctly excludes symlinks during package checksum calculation.
  • The CPackDeb no longer uses fakeroot and system tar program for packaging.
  • The CPack module no longer mangles settings with CMake-special characters when they’re used as defaults for other settings. The macro cpack_set_if_not_set, which was responsible for this, is now deprecated.
  • CMake no longer links executables with flags to export symbols unless the ENABLE_EXPORTS target property is set. See policy CMP0065.
  • The SONAME field is no longer set for MODULE libraries created with the add_library() command. MODULE libraries are meant for explicit dynamic loading at runtime. They cannot be linked so SONAME is not useful.
  • The internal CMAKE__COMPILE_OBJECT rule variable now substitutes compiler include flags in a separate placeholder instead of the main placeholder.

New in CMake 3.4.0 RC1 (Oct 7, 2015)

  • The "if()" command learned a new "TEST" operator that evaluates to true if a given test name has been defined by the "add_test()" command. See policy "CMP0064".
  • The "install(DIRECTORY)" command "DESTINATION" option learned to support "generator expressions".
  • The "install(FILES)" command "DESTINATION" option learned to support "generator expressions".
  • CMake learned to honor "*.manifest" source files with MSVC tools. Manifest files named as sources of ".exe" and ".dll" targets will be merged with linker-generated manifests and embedded in the binary.
  • Deprecated and Removed Features:
  • The "CMakeExpandImportedTargets" module is now documented as deprecated. See module documentation for an explanation.
  • The "CMAKE_USE_RELATIVE_PATHS" variable no longer has any effect. Previously it was partially implemented and unreliable.

New in CMake 3.3.0 (Jul 23, 2015)

  • New Features:
  • Generators:
  • The Makefile Generators now add .DELETE_ON_ERROR to the makefiles that contain the actual build rules for files on disk. This tells GNU make to remove rule outputs when their recipe modifies an output but fails.
  • The Visual Studio Generators learned to support .xaml source files and automatically associate them with corresponding .h and .cpp sources.
  • A new experimental Green Hills MULTI generator was added on Windows. Green Hills MULTI is an IDE for embedded real-time systems.
  • Commands:
  • The add_dependencies() command learned to allow dependencies to be added to interface libraries. Dependencies added to an interface library are followed transitively in its place since the target itself does not build.
  • The execute_process() command learned to support specifying the same file for OUTPUT_FILE and ERROR_FILE.
  • The file(GLOB) and file(GLOB_RECURSE) commands learned a new LIST_DIRECTORIES option to specify whether the glob result should include directories.
  • The find_library(), find_path(), and find_file() commands now search in installation prefixes derived from the PATH environment variable.
  • The if() command learned a new IN_LIST operator that evaluates to true if a given element is contained in a named list.
  • The install(EXPORT) and export() commands learned to export targets that populate the INTERFACE_SOURCES target property.
  • The install(TARGETS) command learned to support generator expressions in the DESTINATION value.
  • Variables:
  • The version of some Fortran compilers is now detected and stored in the CMAKE_Fortran_COMPILER_VERSION variable.
  • The Visual Studio Generators learned a new CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD option to put the INSTALL target in the default build of a solution (.sln) file.
  • Properties:
  • A CROSSCOMPILING_EMULATOR target property and supporting CMAKE_CROSSCOMPILING_EMULATOR variable were introduced to allow target platform binaries to run on the host during cross compiling.
  • A _INCLUDE_WHAT_YOU_USE target property and supporting CMAKE__INCLUDE_WHAT_YOU_USE variable were introduced to tell the Makefile Generators and the Ninja generator to run include-what-you-use along with the compiler for C and CXX languages.
  • The _VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target properties now affect compilation in sources of all target types. See policy CMP0063.
  • The XCODE_ATTRIBUTE_ target property learned to support generator expressions.
  • Modules:
  • The CheckFortranCompilerFlag module was introduced to check Fortran compiler flags, much like the CheckCCompilerFlag module already does for C.
  • The ExternalData module learned a new ExternalData_NO_SYMLINKS option to disable use of symbolic links to populate the real data files and use copies instead.
  • The ExternalData module learned a new RECURSE: option in DATA{} references specifying directories. This allows an entire directory tree of associated files to be matched.
  • The ExternalData module learned a new URL template placeholder %(algo:) to allow custom mapping from algorithm name to URL component through configuration of new ExternalData_URL_ALGO__ variables. This allows more flexibility in remote URLs.
  • The ExternalProject module learned to replace tokens like in the BYPRODUCTS of each step.
  • The ExternalProject module APIs learned to support generator expressions when using LOG_* options and in CMake initial cache options.
  • The FindBoost module now tracks the directories containing libraries separately for RELEASE and DEBUG configurations.
  • The FindCUDA module now defaults to using the static CUDA runtime library if it is available. A new CUDA_USE_STATIC_CUDA_RUNTIME option is offered to control this behavior.
  • The FindMatlab module was completely rewritten. It learned about versions and components and to find Matlab in a more precise and multiplatform way. The module now offers APIs to create mex extensions, documentation, and unit tests.
  • The FindPackageHandleStandardArgs module FIND_PACKAGE_HANDLE_STANDARD_ARGS function now always populates both the _FOUND and _FOUND variables (the latter for backwards compatibility). The FOUND_VAR option is now ignored except to enforce its allowed values.
  • The InstallRequiredSystemLibraries module learned a new CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT option to specify the installation component.
  • Generator Expressions:
  • A new COMPILE_LANGUAGE generator expression was introduced to allow specification of compile options for target files based on the LANGUAGE of each source file. Due to limitations of the underlying native build tools, this feature has varying support across generators. See the cmake-generator-expressions(7) manual for details.
  • CTest:
  • The ctest(1) tool learned a new --repeat-until-fail option to help find sporadic test failures.
  • The CTestCoverageCollectGCOV module learned to support the same CTEST_CUSTOM_COVERAGE_EXCLUDE option as the ctest_coverage() command.
  • CPack:
  • The cpack(1) IFW generator and the CPackIFW module learned to support Qt Framework Installer 2.0 tools.
  • The CPackDeb module learned a new CPACK_DEBIAN__PACKAGE_SHLIBDEPS variable to specify per-component use of dpkg-shlibdeps.
  • The CPackDeb module learned a new CPACK_DEBIAN__PACKAGE_DEPENDS option to specify per-component dependencies.
  • The CPackRPM module learned to package symbolic links more cleanly and now supports directory symlinks with recent rpmbuild versions.
  • The CPackRPM module learned a new CPACK_RPM_ADDITIONAL_MAN_DIRS variable to specify directories containing man pages for the brp-compress RPM macro.
  • The CPackRPM module learned a new CPACK_RPM__PACKAGE_ARCHITECTURE variable to specify a component-specific package architecture.
  • The CPack WIX generator learned the new CPACK_START_MENU_SHORTCUTS, CPACK_DESKTOP_SHORTCUTS and CPACK_STARTUP_SHORTCUTS installed file properties which can be used to install shorcuts in the Start Menu, on the Desktop and in the Startup Folder respectively.
  • Other:
  • The Compile Features functionality is now aware of features supported by GNU compilers on Windows, versions 4.4 through 5.0.
  • The cmake(1) -E tar command learned a new --format option to specify the archive format to be written.
  • On OS X, CMake learned to create XCTest bundles to test Frameworks and App Bundles within Xcode. The FindXCTest module provides convenience functions to handle XCTEST bundles.
  • Deprecated and Removed Features:
  • On OS X the cmake-gui(1) no longer has the Install For Command Line Use menu item. Instead there is a How to Install For Command Line Use menu item that shows an informational dialog box explaining how to make the command line tools available. For example: /Applications/CMake.app/Contents/bin/cmake-gui --install
  • The ctest_build() and build_command() commands no longer tell make tools to ignore errors with the -i option. Previously this was done for Makefile Generators but not others. See policy CMP0061.
  • The Visual Studio 10 2010 generator no longer checks for running VS IDEs with the project open or asks them to reload. This was originally done for VS 10 because it had been done for VS 7 through 9 to avoid prompting for every project in a solution. Since VS >= 10 allow the whole solution to reload at once they do not need CMake to help them.
  • The Visual Studio 7 generator (.NET 2002) is now deprecated and will be removed in a future version of CMake.
  • The Visual Studio 6 generator is now deprecated and will be removed in a future version of CMake.
  • The find_package() command no longer considers project build trees recently configured in a cmake-gui(1). This was previously done only on Windows and is now never done. The NO_CMAKE_BUILDS_PATH option is now ignored if given and effectively always on. Projects may populate the User Package Registry to aid users building multiple dependent projects one after another.
  • The add_definitions() command no longer causes a DEFINITIONS directory property to be populated. See policy CMP0059.
  • With Visual Studio 7, 8, and 9 generators the value of the $(OutDir) placeholder no longer evaluates to the configuration name. Projects should use $(ConfigurationName) for that instead.
  • Using the output of export() with the install(FILES) command is no longer allowed. See policy CMP0062 for details.
  • Other Changes:
  • The Ninja generator now requires that calls to the add_custom_command() and add_custom_target() commands use the BYPRODUCTS option to explicitly specify any files generated by the custom commands that are not listed as outputs (perhaps because their timestamps are allowed to be older than the inputs). See policy CMP0058.
  • Build-time progress output of Makefile Generators has been improved. It no longer mixes progress and build rule messages during parallel builds. The link rule messages now have progress and are displayed as bold green instead of bold red (since red is often associated with an error message).
  • The CMAKE_CFG_INTDIR variable value for Visual Studio 7, 8, and 9 is now $(ConfigurationName) instead of $(OutDir). This should have no effect on the intended use cases of the variable.
  • Linking to library files by a full path in an implicit linker search directory (e.g. /usr/lib/libfoo.a) no longer asks the linker to search for the library (e.g. -lfoo) and now links by full path. See policy CMP0060.

New in CMake 3.2.2 (Apr 15, 2015)

  • Syntax:
  • CMake learned to support unicode characters encoded as UTF-8 on Windows. This was already supported on platforms whose system APIs accept UTF-8 encoded strings. Unicode characters may now be used in CMake code, paths to source files, configured files such as .h.in files, and other files read and written by CMake. Note that because CMake interoperates with many other tools, there may still be some limitations when using certain unicode characters.
  • Commands:
  • The add_custom_command() and add_custom_target() commands learned a new BYPRODUCTS option to specify files produced as side effects of the custom commands. These are not outputs because they do not always have to be newer than inputs.
  • The add_custom_command() and add_custom_target() commands learned a new USES_TERMINAL option to request that the command be given direct access to the terminal if possible. The Ninja generator will places such commands in the console pool. Build targets provided by CMake that are meant for individual interactive use, such as install, are now placed in this pool.
  • A new continue() command was added that can be called inside loop contexts to end the current iteration and start the next one at the top of the loop block.
  • The file(LOCK) subcommand was created to allow CMake processes to synchronize through file and directory locks.
  • The file(STRINGS) now supports UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE as ENCODING options.
  • The install(EXPORT) command now works with an absolute DESTINATION even if targets in the export set are installed with a destination or usage requirements specified relative to the install prefix. The value of the CMAKE_INSTALL_PREFIX variable is hard-coded into the installed export file as the base for relative references.
  • The try_compile() command source file signature now honors link flags (e.g. CMAKE_EXE_LINKER_FLAGS) in the generated test project. See policy CMP0056.
  • The try_run() command learned to honor the LINK_LIBRARIES option just as try_compile() already does.
  • The file(GENERATE) command now generates the output file with the same permissions as the input file if set.
  • The file(GENERATE) command can now generate files which are used as source files for buildsystem targets. Generated files automatically get their GENERATED property set to TRUE.
  • Variables:
  • The CMAKE_MATCH_COUNT variable was introduced to record the number of matches made in the last regular expression matched in an if() command or a string() command.
  • Properties:
  • An ANDROID_API_MIN target property was introduced to specify the minimum version to be targeted by the toolchain.
  • A VS_SHADER_FLAGS source file property was added to specify additional shader flags to .hlsl files, for the Visual Studio generators.
  • Modules:
  • The ExternalData module learned to support Custom Fetch Scripts. This allows projects to specify custom .cmake scripts for fetching data objects during the build.
  • The ExternalProject module learned options to create independent external project step targets that do not depend on the builtin steps.
  • The ExternalProject module ExternalProject_Add() command learned a new CMAKE_CACHE_DEFAULT_ARGS option to initialize cache values in the external project without setting them on future builds.
  • The ExternalProject module ExternalProject_Add() command learned a new TEST_EXCLUDE_FROM_MAIN option to exclude tests from the main build.
  • The ExternalProject module ExternalProject_Add() command learned a new UPDATE_DISCONNECTED option to avoid automatically updating the source tree checkout from version control.
  • The FindCUDA module learned about the cusolver library in CUDA 7.0.
  • The FindGit module learned to find the git command-line tool that comes with GitHub for Windows installed in user home directories.
  • A FindGSL module was introduced to find the GNU Scientific Library.
  • A FindIntl module was introduced to find the Gettext libintl library.
  • The FindLATEX module learned to support components.
  • The FindMPI module learned to find MS-MPI on Windows.
  • The FindOpenSSL module now reports crypto and ssl libraries separately in OPENSSL_CRYPTO_LIBRARY and OPENSSL_SSL_LIBRARY, respectively, to allow applications to link to one without the other.
  • The WriteCompilerDetectionHeader module learned to create a define for portability of the cxx_thread_local feature. The define expands to either the C++11 thread_local keyword, or a pre-standardization compiler-specific equivalent, as appropriate.
  • The WriteCompilerDetectionHeader module learned to create multiple output files per compiler and per language, instead of creating one large file.
  • CTest:
  • The ctest_coverage() command learned to support Delphi coverage.
  • The ctest_coverage() command learned to support Javascript coverage.
  • The CTestCoverageCollectGCOV module was introduced as an alternative to the ctest_coverage() command for collecting gcov results for submission to CDash.
  • CPack:
  • The CPackRPM module learned options to set per-component descriptions and summaries. See the CPACK_RPM_<component>_PACKAGE_DESCRIPTION and CPACK_RPM_<component>_PACKAGE_SUMMARY variables.
  • The CPackRPM module learned options to specify requirements for pre- and post-install scripts. See the CPACK_RPM_PACKAGE_REQUIRES_PRE and CPACK_RPM_PACKAGE_REQUIRES_POST variables.
  • The CPackRPM module learned options to specify requirements for pre- and post-uninstall scripts. See the CPACK_RPM_PACKAGE_REQUIRES_PREUN and CPACK_RPM_PACKAGE_REQUIRES_POSTUN variables.
  • The CPackRPM module learned a new CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX variable to specify a component-specific value to use instead of CPACK_PACKAGING_INSTALL_PREFIX.
  • The CPackRPM module learned a new CPACK_RPM_RELOCATION_PATHS variable to specify multiple relocation prefixes for a single rpm package.
  • Other:
  • The cmake(1) -E tar command now supports creating .xz-compressed archives with the J flag.
  • The cmake(1) -E tar command learned a new --files-from=<file> option to specify file names using lines in a file to overcome command-line length limits.
  • The cmake(1) -E tar command learned a new --mtime=<date> option to specify the modification time recorded in tarball entries.
  • The Compile Features functionality is now aware of features supported by more compilers, including:
  • Apple Clang (AppleClang) for Xcode versions 4.4 though 6.1.
  • GNU compiler versions 4.4 through 5.0 on UNIX and Apple (GNU).
  • Microsoft Visual Studio (MSVC) for versions 2010 through 2015.
  • Oracle SolarisStudio (SunPro) version 12.4.
  • The AUTORCC feature now tracks files listed in .qrc files as dependencies. If an input file to the rcc tool is changed, the tool is automatically re-run.
  • New Diagnostics:
  • The break() command now rejects calls outside of a loop context or that pass arguments to the command. See policy CMP0055.
  • Deprecated and Removed Features:
  • Files written in the cmake-language(7), such as CMakeLists.txt or *.cmake files, are now expected to be encoded as UTF-8. If files are already ASCII, they will be compatible. If files were in a different encoding, including Latin 1, they will need to be converted.
  • The FindOpenGL module no longer explicitly searches for any dependency on X11 libraries with the FindX11 module. Such dependencies should not need to be explicit. Applications using X11 APIs themselves should find and link to X11 libraries explicitly.
  • The implementation of CMake now relies on some C++ compiler features which are not supported by some older compilers. As a result, those old compilers can no longer be used to build CMake itself. CMake continues to be able to generate Makefiles and project files for users of those old compilers however. Compilers known to no longer be capable of building CMake are:
  • Visual Studio 6 and 7.0 – superseded by VisualStudio 7.1 and newer.
  • GCC 2.95 – superseded by GCC 3 and newer compilers.
  • Borland compilers – superseded by other Windows compilers.
  • Compaq compilers – superseded by other compilers.
  • SGI compilers – IRIX was dropped as a host platform.
  • Other Changes:
  • On Windows and OS X, commands supporting network communication via https, such as file(DOWNLOAD), file(UPLOAD), and ctest_submit(), now support SSL/TLS even when CMake is not built against OpenSSL. The Windows or OS X native SSL/TLS implementation is used by default. OS-configured certificate authorities will be trusted automatically.
  • On other platforms, when CMake is built with OpenSSL, these commands now search for OS-configured certificate authorities in a few /etc paths to be trusted automatically.
  • On OS X with Makefile and Ninja generators, when a compiler is found in /usr/bin it is now mapped to the corresponding compiler inside the Xcode application folder, if any. This allows such build trees to continue to work with their original compiler even when xcode-select switches to a different Xcode installation.
  • The Visual Studio generators now write solution and project files in UTF-8 instead of Windows-1252. Windows-1252 supported Latin 1 languages such as those found in North and South America and Western Europe. With UTF-8, additional languages are now supported.
  • The Xcode generator no longer requires a value for the CMAKE_MAKE_PROGRAM variable to be located up front. It now locates xcodebuild when needed at build time.
  • When building CMake itself using SolarisStudio 12, the default libCStd standard library is not sufficient to build CMake. The SolarisStudio distribution supports compiler options to use STLPort4 or libstdc++. An appropriate option to select the standard library is now added automatically when building CMake with SolarisStudio compilers.

New in CMake 3.2.1 (Mar 11, 2015)

  • Syntax:
  • CMake learned to support unicode characters encoded as UTF-8 on Windows. This was already supported on platforms whose system APIs accept UTF-8 encoded strings. Unicode characters may now be used in CMake code, paths to source files, configured files such as .h.in files, and other files read and written by CMake. Note that because CMake interoperates with many other tools, there may still be some limitations when using certain unicode characters.
  • Commands:
  • The add_custom_command() and add_custom_target() commands learned a new BYPRODUCTS option to specify files produced as side effects of the custom commands. These are not outputs because they do not always have to be newer than inputs.
  • The add_custom_command() and add_custom_target() commands learned a new USES_TERMINAL option to request that the command be given direct access to the terminal if possible. The Ninja generator will places such commands in the console pool. Build targets provided by CMake that are meant for individual interactive use, such as install, are now placed in this pool.
  • A new continue() command was added that can be called inside loop contexts to end the current iteration and start the next one at the top of the loop block.
  • The file(LOCK) subcommand was created to allow CMake processes to synchronize through file and directory locks.
  • The file(STRINGS) now supports UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE as ENCODING options.
  • The install(EXPORT) command now works with an absolute DESTINATION even if targets in the export set are installed with a destination or usage requirements specified relative to the install prefix. The value of the CMAKE_INSTALL_PREFIX variable is hard-coded into the installed export file as the base for relative references.
  • The try_compile() command source file signature now honors link flags (e.g. CMAKE_EXE_LINKER_FLAGS) in the generated test project. See policy CMP0056.
  • The try_run() command learned to honor the LINK_LIBRARIES option just as try_compile() already does.
  • The file(GENERATE) command now generates the output file with the same permissions as the input file if set.
  • The file(GENERATE) command can now generate files which are used as source files for buildsystem targets. Generated files automatically get their GENERATED property set to TRUE.
  • Variables:
  • The CMAKE_MATCH_COUNT variable was introduced to record the number of matches made in the last regular expression matched in an if() command or a string() command.
  • Properties:
  • An ANDROID_API_MIN target property was introduced to specify the minimum version to be targeted by the toolchain.
  • A VS_SHADER_FLAGS source file property was added to specify additional shader flags to .hlsl files, for the Visual Studio generators.
  • Modules:
  • The ExternalData module learned to support Custom Fetch Scripts. This allows projects to specify custom .cmake scripts for fetching data objects during the build.
  • The ExternalProject module learned options to create independent external project step targets that do not depend on the builtin steps.
  • The ExternalProject module ExternalProject_Add() command learned a new CMAKE_CACHE_DEFAULT_ARGS option to initialize cache values in the external project without setting them on future builds.
  • The ExternalProject module ExternalProject_Add() command learned a new TEST_EXCLUDE_FROM_MAIN option to exclude tests from the main build.
  • The ExternalProject module ExternalProject_Add() command learned a new UPDATE_DISCONNECTED option to avoid automatically updating the source tree checkout from version control.
  • The FindCUDA module learned about the cusolver library in CUDA 7.0.
  • The FindGit module learned to find the git command-line tool that comes with GitHub for Windows installed in user home directories.
  • A FindGSL module was introduced to find the GNU Scientific Library.
  • A FindIntl module was introduced to find the Gettext libintl library.
  • The FindLATEX module learned to support components.
  • The FindMPI module learned to find MS-MPI on Windows.
  • The FindOpenSSL module now reports crypto and ssl libraries separately in OPENSSL_CRYPTO_LIBRARY and OPENSSL_SSL_LIBRARY, respectively, to allow applications to link to one without the other.
  • The WriteCompilerDetectionHeader module learned to create a define for portability of the cxx_thread_local feature. The define expands to either the C++11 thread_local keyword, or a pre-standardization compiler-specific equivalent, as appropriate.
  • The WriteCompilerDetectionHeader module learned to create multiple output files per compiler and per language, instead of creating one large file.
  • CTest:
  • The ctest_coverage() command learned to support Delphi coverage.
  • The ctest_coverage() command learned to support Javascript coverage.
  • The CTestCoverageCollectGCOV module was introduced as an alternative to the ctest_coverage() command for collecting gcov results for submission to CDash.
  • CPack:
  • The CPackRPM module learned options to set per-component descriptions and summaries. See the CPACK_RPM__PACKAGE_DESCRIPTION and CPACK_RPM__PACKAGE_SUMMARY variables.
  • The CPackRPM module learned options to specify requirements for pre- and post-install scripts. See the CPACK_RPM_PACKAGE_REQUIRES_PRE and CPACK_RPM_PACKAGE_REQUIRES_POST variables.
  • The CPackRPM module learned options to specify requirements for pre- and post-uninstall scripts. See the CPACK_RPM_PACKAGE_REQUIRES_PREUN and CPACK_RPM_PACKAGE_REQUIRES_POSTUN variables.
  • The CPackRPM module learned a new CPACK_RPM__PACKAGE_PREFIX variable to specify a component-specific value to use instead of CPACK_PACKAGING_INSTALL_PREFIX.
  • The CPackRPM module learned a new CPACK_RPM_RELOCATION_PATHS variable to specify multiple relocation prefixes for a single rpm package.
  • Other:
  • The cmake(1) -E tar command now supports creating .xz-compressed archives with the J flag.
  • The cmake(1) -E tar command learned a new --files-from= option to specify file names using lines in a file to overcome command-line length limits.
  • The cmake(1) -E tar command learned a new --mtime= option to specify the modification time recorded in tarball entries.
  • The Compile Features functionality is now aware of features supported by more compilers, including:
  • Apple Clang (AppleClang) for Xcode versions 4.4 though 6.1.
  • GNU compiler versions 4.4 through 5.0 on UNIX and Apple (GNU).
  • Microsoft Visual Studio (MSVC) for versions 2010 through 2015.
  • Oracle SolarisStudio (SunPro) version 12.4.
  • The AUTORCC feature now tracks files listed in .qrc files as dependencies. If an input file to the rcc tool is changed, the tool is automatically re-run.
  • New Diagnostics:
  • The break() command now rejects calls outside of a loop context or that pass arguments to the command. See policy CMP0055.
  • Deprecated and Removed Features:
  • Files written in the cmake-language(7), such as CMakeLists.txt or *.cmake files, are now expected to be encoded as UTF-8. If files are already ASCII, they will be compatible. If files were in a different encoding, including Latin 1, they will need to be converted.
  • The FindOpenGL module no longer explicitly searches for any dependency on X11 libraries with the FindX11 module. Such dependencies should not need to be explicit. Applications using X11 APIs themselves should find and link to X11 libraries explicitly.
  • The implementation of CMake now relies on some C++ compiler features which are not supported by some older compilers. As a result, those old compilers can no longer be used to build CMake itself. CMake continues to be able to generate Makefiles and project files for users of those old compilers however. Compilers known to no longer be capable of building CMake are:
  • Visual Studio 6 and 7.0 – superseded by VisualStudio 7.1 and newer.
  • GCC 2.95 – superseded by GCC 3 and newer compilers.
  • Borland compilers – superseded by other Windows compilers.
  • Compaq compilers – superseded by other compilers.
  • SGI compilers – IRIX was dropped as a host platform.
  • Other Changes:
  • On Windows and OS X, commands supporting network communication via https, such as file(DOWNLOAD), file(UPLOAD), and ctest_submit(), now support SSL/TLS even when CMake is not built against OpenSSL. The Windows or OS X native SSL/TLS implementation is used by default. OS-configured certificate authorities will be trusted automatically.

New in CMake 3.1.2 (Feb 6, 2015)

  • install: Fix regression in default configuration selection
  • CPack: Fix packaging of source tarballs with symbolic links
  • KWSys Directory: Check opendir return value before using it (#15367)
  • Help: Clarify status of link_libraries command
  • Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
  • MSVC: Fix initialization of RelWithDebInfo shared library link flags (#15385)
  • FeatureSummary: Fix bracket in documentation.
  • FindOpenSSL: fix detection of OpenSSL 1.0.2
  • ctest_build: Update GNU make error message matching (#15379)

New in CMake 3.1.0 (Dec 18, 2014)

  • Windows Phone and Windows Store support has been added to Visual Studio 11 (2012) and above Generators.
  • NVIDIA Nsight Tegra support has been added to Visual Studio 10 (2010) and above Generators.
  • New "target_compile_features" command allows populating target based compile features. CMake uses this information to ensure that the compiler in use is capable of building the target, and to add any necessary compile flags such as -std=gnu++11 to support language features. More information on this is found at: - http://www.cmake.org/cmake/help/v3.1/manual/cmake-compile-features.7.html
  • The syntax for *Variable References* and *Escape Sequences* was simplified in order to allow a much faster implementation. See policy "CMP0053".
  • The "if" command no longer automatically dereferences variables named in quoted or bracket arguments. See policy "CMP0054".
  • The target property "SOURCES" now generally supports "Generator Expressions". The generator expressions may be used in the "add_library" and "add_executable" commands.
  • It is now possible to write and append to the target property "SOURCES". The variable "CMAKE_DEBUG_TARGET_PROPERTIES" can be used to trace the origin of sources.
  • CPack gained "7Z" and "TXZ" generators supporting lzma-compressed archives.
  • The ExternalProject module has learned to support lzma-compressed source tarballs with ".7z", ".tar.xz", and ".txz" extensions.
  • The ExternalProject module ExternalProject_Add command learned a new BUILD_ALWAYS option to cause the external project build step to run every time the host project is built.
  • The ctest_coverage command learned to support Intel coverage files with the "codecov" tool.
  • The ctest_memcheck command learned to support sanitizer modes, including "AddressSanitizer", "MemorySanitizer", "ThreadSanitizer", and "UndefinedBehaviorSanitizer".
  • Deprecated and Removed Features:
  • In CMake 3.0 the "target_link_libraries" command accidentally began allowing unquoted arguments to use Generator Expressions containing a semicolon separated list within them. For example:
  • set(libs B C) target_link_libraries(A PUBLIC $)
  • This is equivalent to writing:
  • target_link_libraries(A PUBLIC $)
  • and was never intended to work. It did not work in CMake 2.8.12. Such generator expressions should be in quoted arguments:
  • set(libs B C) target_link_libraries(A PUBLIC "$")
  • CMake 3.1 again requires the quotes for this to work correctly.

New in CMake 3.0.2 (Sep 12, 2014)

  • 0014386: [CMake] Broken build (proposing fix) resolved.
  • 0014027: [Modules] CMake fails build on HPUX with standard HP C and make resolved.
  • 0014246: [CTest] ctest --help-variable-list fails to display CTEST* variables (Brad King) resolved.
  • 0014946: [CMake] Document build v. install values for INTERFACE_INCLUDE_DIRECTORIES (Brad King) resolved.
  • 0014936: [CMake] CMAKE_GNUtoMS_VCVARS is not set when using Visual Studio 12 2013 and CMakeAddFortranSubdirectory (Brad King) resolved.
  • 0014918: [CMake] x64 build under cygwin fails (Brad King) resolved.
  • 0014928: [CMake] cmake -E create_symlink always returns code 0 even when failing to create symlink resolved.
  • 0014916: [CMake] Info.plist is stored in the wrong directory when creating bundles in subdirectories resolved.
  • 0014908: [CMake] CMAKE_OSX_SYSROOT being ignored with frameworks in /Library/Frameworks resolved.
  • 0014856: [CMake] cannot build cmake on Solaris (Brad King) resolved.
  • 0014903: [Modules] InstallRequiredSystemLibraries CMAKE_INSTALL_MFC_LIBRARIES does not work with MSVC 2013 (Brad King) resolved.
  • 0014894: [CMake] Regression/Qt: cmake touches on each run moc_*.cxx_parameters (Peter Kuemmel) resolved.
  • 0014901: [CMake] Adding an .xib to an XCode project does not work. resolved.
  • 0014887: [CMake] CMake fails to compile error: use of undeclared identifier 'abi' (Brad King) resolved.
  • 0014886: [Documentation] [PATCH] Make documentation generation python3 compatible. (Brad King) resolved.
  • 0014882: [CPack] cmake: strlen(): cpack killed by SIGSEGV (Brad King) resolved.
  • 0014875: [Modules] /lib64 wrongfully appears in RPATH (Brad King) resolved.
  • 0014870: [CMake] FindMPI.cmake returns 32-bit libraries on 64-bit systems for Fortran-only projects (Brad King) resolved.
  • 0014099: [CMake] Ninja: CMAKE_${LANG}_FLAGS passed to linker come from incorrect scope (Peter Kuemmel) resolved.
  • 0014184: [CMake] link_directories produce backslash path for mingw (Peter Kuemmel) resolved.
  • 0014865: [CMake] CMakeDetermineRCCompiler does not detect windres from "i686-w64-mingw32.shared-windres" (Brad King) resolved.
  • 0014089: [CMake] add_test/add_custom_command: Support generator expressions in WORKING_DIRECTORY (Ben Boeckel) resolved.
  • 0014339: [Modules] CheckCXXCompilerFlag seems to have problems with XL and BCC (Rolf Eike Beer) resolved.
  • 0014739: [Modules] findboost.cmake can't find boost::mpi library (Brad King) resolved.
  • 0014808: [CMake] Policy CMP0026 set OLD not working for _LOCATION (Stephen Kelly) resolved.
  • 0014790: [CMake] CMake crashes with XCode generator (Brad King) resolved.
  • 0014806: [CMake] cmake does not detect correct intel c/c++ compiler version (Brad King) resolved.
  • 0013251: [CMake] cmake -E tar fails to extract some files correctly (Brad King) resolved.
  • 0014798: [CMake] CMake fails to build correctly from source on FreeBSD... resolved.
  • 0014784: Seg fault with wrong number of args for check-build-system (Brad King) resolved.
  • 0014393: [Modules] FindwxWidgets.cmake doesn't look for x64 wxWidgets (MSVC) directories. (Brad King) resolved.
  • 0014577: [CMake] Need to map /Fd to ProgramDataBaseFileName in VS 7,8,9 (Brad King) resolved.
  • 0014774: [Modules] FindFreetype cannot find version 2.5 resolved.
  • 0014600: [CMake] Document PDB behavior w.r.t. static libraries (Brad King) resolved.
  • 0014755: [CMake] Cannot use VisualStudio 2013 Express with Windows7.1SDK for 64Bit builds resolved.
  • 0014735: [CMake] FindOpenSSL.cmake does not honor the OPENSSL_ROOT_DIR variable for non Windows platforms (Brad King) resolved.
  • 0014366: [CMake] Command line definitions ignored if -DCMAKE_C_COMPILER is passed (Stephen Kelly) closed.
  • 0012184: [Modules] SWIG_ADD_MODULE generates wrong file name for Ruby under Mac OS X (jschueller) closed.
  • 0013318: [CMake] swig: -noproxy option not supported with python (jschueller) closed.
  • 0014493: [CMake] Document relationship of VS_KEYWORD and VS_GLOBAL_KEYWORD (Brad King) closed.
  • 0011693: [CMake] On Mac OS X, the CMake .app filename should not contain the version number (Brad King) closed.
  • 0014659: Support for MirBSD in CMake (Brad King) closed.
  • 0014712: [CMake] improper setting of CMAKE_HOST_SYSTEM_PROCESSOR (Brad King) closed.
  • 0008466: [CTest] Provide finer control than pass/fail for a test program (Rolf Eike Beer) closed.
  • 0009188: [CMake] ADD_DEPENDENCIES silently accepts invalid target names (Nils Gladitz) closed.
  • 0013952: [CMake] "CodeBlocks NMake Makefiles" generates broken xml if spaces in path (Nils Gladitz) closed.
  • 0014690: [CMake] CheckTypeSize doesn't behave as documented in daily build (Daniele E. Domenichelli) closed.
  • 0014692: [Modules] UseQt4.cmake does not adhere to policy CMP0043 (Stephen Kelly) closed.
  • 0014686: [CMake] FindBoost.cmake does not provide a way to use libraries built by boost with the runtime-debugging=off bjam parameter (Brad King) closed.
  • 0014508: [Modules] FindJNI.cmake fails to set JAVA_INCLUDE_PATH2 for darwin (Brad King) closed.
  • 0009822: [CMake] Please expose: cmGlobalGenerator::GetExportSet at cmake level (Stephen Kelly) closed.
  • 0014439: [CPack] WiX: set/respect file/directory permissions (Nils Gladitz) closed.
  • 0014670: [CCMake] get_property does not work for ALIASED_TARGET property (Stephen Kelly) closed.
  • 0011338: [CMake] CMake adds CURRENT_SOURCE_DIR to include_directories if there is a VTK project. (Stephen Kelly) closed.
  • 0014646: [CMake] Clarify if(TARGET) documentation (Brad King) closed.
  • 0014658: [CMake] Document CMAKE_VERBOSE_MAKEFILE initialization (Brad King) closed.
  • 0014657: [Documentation] TestCXXAcceptsFlag description is incorrect (Brad King) closed.
  • 0014661: [CMake] Explicit project type GUID needed with INCLUDE_EXTERNAL_MSPROJECT (Brad King) closed.
  • 0014631: [CMake] source_group should document behavior of relative paths (Brad King) closed.
  • 0014453: [CMake] Look into performance of GenerateExportHeader test (Stephen Kelly) closed.
  • 0014622: [CMake] Typo in helpstrings for CMAKE_(C|CXX|Fortran)_STANDARD_LIBRARIES_INIT (Brad King) closed.
  • 0014636: [CMake] Error with whitelisted properties and generator expression in target_link_libraries (Stephen Kelly) closed.
  • 0014645: [CMake] exec_program and execute_process don't capture output when it does not end in a newline (Brad King) closed.
  • 0014133: [CMake] CMake creates duplicate target subfolders in Xcode project files (Brad King) closed.
  • 0014434: [CPack] WiX: component support (Nils Gladitz) closed.
  • 0014603: [CMake] Cross compiling for darwin fails (Brad King) closed.
  • 0014605: [CMake] Cross compiling/linking with MSVC on linux using wine fails (Brad King) closed.
  • 0014606: [CMake] Obsolete description for CMAKE_(C|CXX|Fortran)_FLAGS_RELEASE (Brad King) closed.
  • 0014593: [Modules] FindGTK2.cmake fails to find GTK with Quartz backend (Daniele E. Domenichelli) closed.
  • 0013173: [CMake] Swig module can't handle absolute path (jschueller) closed.
  • 0013426: [Modules] FindSWIG.cmake doesn't mark variables as advanced (jschueller) closed.
  • 0013771: [CMake] Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_ROOT in FindSWIG module. (jschueller) closed.
  • 0013772: [CMake] UseSWIG.cmake does not handle relative paths with parent directories (jschueller) closed.
  • 0013814: [CMake] SWIG C# generates a DllImport line that doesn't match the library name (jschueller) closed.
  • 0014370: [CMake] add_custom_command() commands run from incorrect directory with Ninja generator (Peter Kuemmel) closed.
  • 0014520: [CMake] UseSWIG module can generate too long command lines in the build chain (jschueller) closed.
  • 0014411: [CMake] Ninja dependencies don't work with Intel and many other GCC-like compilers (Peter Kuemmel) closed.
  • 0014458: [CMake] Support clang-cl, clang's cl-compatible driver (Brad King) closed.
  • 0014544: Remove edit_cache target from ninja output (Brad King) closed.
  • 0014548: [CMake] Document CMAKE_MAKE_PROGRAM as preferred over CMAKE_BUILD_TOOL, not vice versa (Brad King) closed.
  • 0014562: [CMake] not able to compile a simple test program with -G "Visual Studio 11 2012" -Tv90 (Brad King) closed.
  • 0014567: [Modules] FindOpenMP is incorrect for compilers that accept OpenMP with no flags (Rolf Eike Beer) closed.
  • 0014587: [CMake] Add support for wxWidgets 3.0.0 (Brad King) closed.
  • 0013140: [CMake] CMake does not reject unsupported logical target names (Stephen Kelly) closed.
  • 0013902: [CMake] target_link_libraries should not accept utility targets (Stephen Kelly) closed.
  • 0013947: [CMake] Policy to disallow link interface self-references (Stephen Kelly) closed.
  • 0014554: [CPack] Pass custom arguments to WIX (Nils Gladitz) closed.
  • 0014561: [CMake] Errors with add_libaray(name INTERFACE) when TARGET_SUPPORTS_SHARED_LIBS is false (Stephen Kelly) closed.
  • 0014540: [Modules] Typo in PHP find module (Brad King) closed.
  • 0014541: [Modules] FindJNDI: amd64/ppc64 kernels might be running on 32bit system (Brad King) closed.
  • 0014402: [CMake] Replace "Visual Studio 11" by Visual Studio 2012" in cmake-gui (Brad King) closed.
  • 0012600: [CMake] Specifying CMAKE_INSTALL_PREFIX in a CMAKE_TOOLCHAIN_FILE file has no effect (Stephen Kelly) closed.
  • 0012611: [Documentation] Missing CMAKE_INCLUDE_DIRECTORIES_BEFORE from documentation (Stephen Kelly) closed.
  • 0013188: [CMake] Target and directory include_directory usage. (Stephen Kelly) closed.
  • 0013663: FindBoost documentation example should clarify it only finds static libraries (Brad King) closed.
  • 0014355: [Modules] Implementation of qt4_add_executable/library (Stephen Kelly) closed.
  • 0014533: [CMake] With Ninja, CTest is launching one test twice (Nils Gladitz) closed.
  • 0014713: [CMake] cmake -create-symlink doesn't overwrite existing dangling(!) symlinks (Brad King) closed.
  • 0014378: [CMake] ZERO_CHECK.vcxproj referenced despite CMAKE_SUPPRESS_REGENERATION set to FALSE (Brad King) closed.
  • 0014389: Find package Java should look first in the JAVA_HOME env var. (Graham Markall) closed.
  • 0014481: [CMake] Unable to support a new language using CMAKE_MODULE_PATH within an outside project. (Brad King) closed.
  • 0014507: [CMake] -i_dynamic flag (depricated) incorrectly added when using intel compilers (Brad King) closed.
  • 0011137: [CMake] Unable to parse CMakeLists.txt in UTF-8 with BOM encoding (Brad King) closed.
  • 0014181: [CMake] One-character function names don't work (Brad King) closed.
  • 0014494: [CMake] Doesn't create .lib for header only targets on Windows. (Stephen Kelly) closed.
  • 0014498: [CMake] Folder references aren't added correctly to Xcode projects. (Brad King) closed.
  • 0014499: [CMake] Add support for .NET target framework version for VS 2008 (Brad King) closed.
  • 0014502: [Modules] FindJava.cmake message incorrectness (Rolf Eike Beer) closed.
  • 0013035: [CMake] Support for MinGW Clang on Windows (Brad King) closed.
  • 0014466: [CPack] Deterministic file/directory IDs (Nils Gladitz) closed.
  • 0014468: [CPack] WiX: Include extra .wxs and/or .wixlib files (Nils Gladitz) closed.
  • 0014471: [CMake] -T switch with Intel Compiler does not set CMAKE_CXX_COMPILER properly (Brad King) closed.
  • 0014476: [CMake] MSVC_IDE and MSVC not set when using Intel Platform Toolset (Brad King) closed.
  • 0012886: [CMake] Add a manifest or main-class file to the created jar (Brad King) closed.
  • 0014387: [CMake] setting MS build output verbosity to "Diagnostic" in VisualStudio leads to CMAKE_CXX_SIZEOF_DATA_PTR set to "" (Brad King) closed.
  • 0014418: [Modules] FindOpenSSL: should mark {LIB,SSL}_EAY_{DEBUG,RELEASE} as advanced (Rolf Eike Beer) closed.
  • 0014424: [Documentation] Vague ADD_DEPENDENCIES() Description (Brad King) closed.
  • 0014358: [Modules] FortranCInterface fails to find generated test program when cross-compiling (Brad King) closed.
  • 0014371: [CCMake] bootstrapping with --docdir puts documentation in wron directory (Brad King) closed.
  • 0014608: [CMake] segmentation fault when "export(TARGETS nonexistenttarget FILE somefile.cmake") (Stephen Kelly) closed.
  • 0014570: Intel + Ninja regression: unable to compile a simple test program (Peter Kuemmel) closed.
  • 0013123: [CTest] ctest_empty_binary_directory failure is too silent (Nils Gladitz) closed.
  • 0014121: [CMake] Custom command errors are hidden when CTest launchers are used with Ninja (Robert Maynard) closed.
  • 0013143: [CTest] ctest_coverage runs gcov on gcda files outside the current build directory (Nils Gladitz) closed.
  • 0014511: [CMake] Makefile generators segfault when custom target sources have compile definitions (Nils Gladitz) closed.
  • 0014484: [CTest] CTest ignores RUN_SERIAL if test gets run as a dependency of another test (Nils Gladitz) closed.

New in CMake 2.8.12.2 (Jan 18, 2014)

  • VS: Map /Fd to ProgramDataBaseFileName for VS 7,8,9 (#14577)
  • Replace rule placeholder consistently (#14667)
  • VS: Convert include path to backslashes for VS >= 10
  • Revert "Ninja: Track configured files so we can regenerate them."
  • FindOpenMP: fix detecting compilers that do not need any special flag (#14567)
  • Xcode: Fix storyboard view
  • CMakeDetermineCompilerId: Fix compiler line match for Xcode 5.1

New in CMake 2.8.12.1 (Nov 9, 2013)

  • The 2.8.12.1 release was packaged with CPack which is included as part of the 2.8.12.1 release. The .sh files are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions. The OS-machine.tar.gz files are gziped tar files of the install tree. The OS-machine.tar.Z files are compressed tar files of the install tree. The tar file distributions can be untared in any directory. They are prefixed by the version of CMake. For example, the Linux-i386 tar file is all under the directory cmake-2.8.12.1-Linux-i386. This prefix can be removed as long as the share, bin, man and doc directories are moved relative to each other.

New in CMake 2.8.12 (Oct 11, 2013)

  • The 2.8.11 release was packaged with CPack which is included as part of the 2.8.11 release. The .sh files are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions. The OS-machine.tar.gz files are gziped tar files of the install tree. The OS-machine.tar.Z files are compressed tar files of the install tree. The tar file distributions can be untared in any directory. They are prefixed by the version of CMake. For example, the Linux-i386 tar file is all under the directory cmake-2.8.11-Linux-i386. This prefix can be removed as long as the share, bin, man and doc directories are moved relative to each other.

New in CMake 2.8.9 (Sep 21, 2012)

  • The 2.8.9 release was packaged with CPack which is included as part of the 2.8.9 release. The .sh files are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions. The OS-machine.tar.gz files are gziped tar files of the install tree. The OS-machine.tar.Z files are compressed tar files of the install tree. The tar file distributions can be untared in any directory. They are prefixed by the version of CMake. For example, the Linux-i386 tar file is all under the directory cmake-2.8.9-Linux-i386. This prefix can be removed as long as the share, bin, man and doc directories are moved relative to each other.