CMake 3.17 Release Notes

Changes made since CMake 3.16 include the following.

New Features




  • The IBM XL Fortran compiler is now supported by the Ninja generator.


  • 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.





  • 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.



  • The CTEST_CONFIGURATION_TYPE variable is now set from the command line when ctest(1) is invoked with -C <cfg>.

  • The ctest(1) tool gained support for Dr. Memory to run memcheck runs.

  • The ctest(1) tool gained a --no-tests=<[error|ignore]> 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 <mode>:<n> option to specify conditions in which to repeat tests. This generalizes the existing --repeat-until-fail <n> option to add modes for until-pass and after-timeout.

  • The ctest_test() command gained a REPEAT <mode>:<n> option to specify conditions in which to repeat tests.



  • 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 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.


Changes made since CMake 3.17.0 include the following.


  • 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.


  • 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.


  • The default value of CMAKE_AUTOMOC_PATH_PREFIX was changed to OFF because this feature can break existing projects that have identically named header files in different include directories. This restores compatibility with behavior of CMake 3.15 and below. The default was also changed to OFF in 3.16.9.