CMake 3.21.4
* Tests/RunCMake/Autogen: test CMP0111 behavior
* cmQtAutoGenInitializer: support IMPLIB-only imported targets
* Tests: Fix RunCMake.XcodeProject XcodeIOSInstallCombined cases for Xcode 13.0
* gitlab-ci: update macOS jobs to use Xcode 13.0
* bootstrap: Enable cmake_language command to support cmake-gui with Qt 6.2
* ci: Enable CTest.Update{CVS,SVN,HG} tests
* MSVC: Tolerate cxx_std_23 feature on older compiler versions
* zstd: Backport fix for SIGBUS on armv6 from zstd 1.5.0
* IRSL: Fix discovery of VS 2022 v143 toolset redistributables for preview 5
* Source: Fix typo in _WIN32 preprocessor checks
* BinUtils: Avoid llvm-strip versions older than Clang 11
* VS: Update Visual Studio 17 2022 generator for the Release Candidates
* CPack/IFW: Add support for QtIFW 4.1
* Tests: Specify destination for Xcode scheme
* FindMatlab: Add R2021b => 9.11 version
* NVHPC: only use '-MD' for the C and CXX languages
* FortranCInterface: Fix regression in timestamp check
* TestDriver: Fix old-style-cast warning in C++ mode
* GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIR
All checksums have been double-checked against existing RMD160 and
SHA512 hashes
Could not be committed due to merge conflict:
devel/py-traitlets/distinfo
The following distfiles were unfetchable (note: some may be only fetched
conditionally):
./devel/pvs/distinfo pvs-3.2-solaris.tgz
./devel/eclipse/distinfo eclipse-sourceBuild-srcIncluded-3.0.1.zip
CMake 3.21.3
* FindBoost: Add support for Boost 1.77
* MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolset
* IRSL: Add discovery of VS 2022 v143 toolset redistributables
* gitlab-ci: Update Windows builds to MSVC 19.29-16.11 toolset
* VS: Fix managed C++ project generation for VS 2022
* VS: Update Visual Studio 17 2022 generator for Preview 4
* HIP: Detect ROCm path earlier
* HIP: Remove ROMClang compiler id and use Clang directly
* HIP: Simplify detection of HIP runtime CMake package
* Android: Restore searching PATH for executables
* IAR: Restore support for projects not enabling policy CMP0057
* FindPython: Ensure homebrew on Mac M1 is used
* Ninja: fix ARMClang paths for Windows
* HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURES
* KWSys: SystemTools: Ensure Windows Vista APIs are available before using them
CMake 3.21.2
* AUTOUIC: Add test for cyclic dependency between UI headers and timestamp
* CPackRPM: avoid a spurious `;` in the `%pre` and other sections with scripts
* FindMPI: do not detect `-framework` as a compile flag
* GNUInstallDirs: avoid unwanted variable dereference
* VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries
* VS: Fix /reference and /headerUnit flag table entries for v142 and v143
* CheckLanguage: Avoid CMP0126 warning
* AUTOUIC: Revert "Fix generating of dependency rules for UI header files"
* VS: Add special case for '-T version=14.29.16.11' under VS 16.11
* VS: Update Visual Studio 17 2022 generator for Preview 3.1
* Help: Add missing versionadded annotation for CPACK_DMG_FILESYSTEM
* Help: Fix unlinked mention of CMAKE_TOOLCHAIN_FILE
* BinUtils: Avoid searching CMAKE_PREFIX_PATH
* macOS: Restore support for Mac OS X 10.4 (Tiger)
* Platform/Haiku: Remove the include-once behavior
* CMakePresets: Check presets with their own file version
* CTest: Reset multi-options to persistent multi-options
* add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILER
* Help: get_filename_component: fix version info for cmake_path
* FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW
* Help: cmake_path: add missing parameter
* NVHPC: Support 21.07 change to '-MD' where it behaves like gcc
* NVHPC-CXX: Add support for C++20
* NVHPC-C: Add support for C17
* FindBinUtils: Fall back to ld for Clang without lld
* Android: Fix NDK toolchain dir on arm64 mac
* CUDA/Clang: Fix separable compilation in non-root directories with Makefiles
* CUDA/Clang: Simplify --register-link-binaries logic
* Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static libraries
CMake 3.21.1
AUTOUIC: Fix cyclic dependency between generated UI headers and timestamp
AUTOUIC: Fix generating of dependency rules for UI header files
ci: use CMake 3.21.0
Help/ctest_memcheck: mention `ctest_test` arguments
TestDriver: suppress deprecated header lints for time.h
TestDriver: use `CM_NULL` to avoid lints about `nullptr` usage
Help/ctest_test: add a comment to also update `ctest_memcheck`
enable_language: Fix test for working compiler with CMP0126 NEW behavior
VS: Recognize CSharp VS 2019 compiler version v142
VS: Improve v142 CL flag table LanguageStandard ordering
VS: Add CSharp VS 2022 compiler version and flag table v143
VS: Add v143 flag tables for VS 17.0 Preview 2
VS: Fix `/MANIFESTUAC:` link flag mapping for v143
VS: Map the link `/debug` flag for v143
VS: Remove the /MERGE flag from v143 link flag table
VS: Fix `/analyze:log` flag mapping for v143
VS: Add `-Zc:inline[-]` flag table entry for v143
VS: Populate `/Y-` flag table entry for v143
VS: Populate `-Qspectre-` flag table entry for v143
VS: Populate `/JMC-` flag table entry for v143
VS: Remove empty ConformanceMode entry from flag table for v143
VS: Remove empty LanguageStandard entries from flag table for v143
VS: Remove empty ExternalWarningLevel entry from flag table for v143
VS: Remove broken EnableASAN entry from flag table for v143
VS: Fix `/sourceDependencies` flag table entries for v143
VS: Update Visual Studio 17 2022 generator for Preview 2
CMakeDetermineCompilerId: Fix CMAKE_EXECUTABLE_FORMAT in CMP0126 NEW behavior
try_compile: Propagate CMP0126 to the generated test project
CMakeDependentOption: Revert "Allow parentheses in the depends string"
cmMessenger: Revert to non-color messages on Windows
cmGeneratorExpressionNode: Factor out local variable for global generator
Swift: Update test case to try CMP0126 NEW behavior
Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configs
VS: Remove cl /FS entry from flag table for v142 and v143
VS: Remove C++ module CompileAs flag table entries for v142 and v143
Help: Clarify wording of CMP0124
Help: Explain policy CMP0125 in more detail
Help: Make policy CMP0126 wording more accurate
Help: Fix trivial typo
Help: Clarify which project() call PROJECT_IS_TOP_LEVEL is for
Help: Re-order file() sub-commands in Filesystem section
Help: Expand details for file(COPY_FILE)
Help: Clarify and correct wording around DEPFILE option
Help: Improve wording and cross-referencing for ctest JUnit output
Help: Add cross-references between test output size ctest variables
IAR: Moved search logic to BinUtils.
AutoGen: Fix needless compilation of mocs_compilation.cpp
KWSys 2021-07-26 (d5fd6ca2)
CMakePresets.json: Fix expansion issue with empty binaryDir
Tests: Clean up Ninja Multi-Config test from cb777dd
Compiler/IAR: search for both IAR's binaries * and *.exe
Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIX
Help: Document CMAKE_EXECUTABLE_SUFFIX_<LANG> explicitly
libuv: Fix building with mingw toolchains for ARM/AArch64
GNU: Correct C23 flags
FindXCTest: Fix output directory for test bundle with Xcode 12.5
Tests/CompileOptions: allow CMAKE_BUILD_TYPE=None
Add option to explicitly avoid using execinfo for backtraces
CMake 3.21 Release Notes
************************
Changes made since CMake 3.20 include the following.
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 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_<LANG>_LINKER_LAUNCHER"
variable and "<LANG>_LINKER_LAUNCHER" target property for details.
* The "Visual Studio 17 2022" generator was added. This is
experimental and based on "Visual Studio 2022 Preview 1.1" because
this version of VS has not been released.
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 <dir>" command-line option
to specify the location of the install prefix.
* "cmake(1)" gained the "--toolchain <path/to/file>" 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 "<PROJECT-NAME>_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
$<TARGET_OBJECTS> 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.
Fixes building on arm64 in an x86_64 chroot where it would append
"-arch x86_64" and then fail to link. schmonz verified that this
change doesn't seem to affect non-chroot native builds.
CMake 3.20.5
* 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}
* ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutions
* CMake: Allow override of unexpected non-flow-control commands
CMake 3.20.4
* ci: use consistent sccache builds
* 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
* FindBoost: Add check for json component header in Boost 1.75+
* Help: cmake_path: fix erroneous example for IS_PREFIX
* MSVC: C++20 final flag, C++23 support
* Clang/MSVC: C++20 final flag, C++23 support
* presets: Fix buildPreset "jobs"
* presets: Fix buildPreset "targets" not allowing a single string
CMake 3.20.3
* Help: Use relative path for IDE Integration guide link to preset schema
* BinUtils: Use more-private temporary variable names
* ObjectiveC: Respect OSX_ARCHITECTURES for OBJC
* FindBoost: Add support for Boost 1.76
* Ninja: Restore support for Fortran in a symlinked build tree
* Utilities/Sphinx: Update man page config for Sphinx 4
* ExternalProject: Ensure git fetch if updating to hash we don't have yet
* ExternalProject: Only add git config setting with git 1.7.7 or later
* Ninja Multi-Config: Split long command lines by config
* CMP0082: Check EXCLUDE_FROM_ALL property at generate time
* GNU: C++17 default version
* GNU: Final C++20 flags
* GNU: C++23 support
* CUDA: improve regex for CUDA Toolkit root from nvcc verbose output
* cmCommandLineArgument: Correctly record parsing failures
* cmake: `--build` and `--install` error out when encountering bad flags
* cmCommandLineArgument: Provide more information syntax error messages
* NVHPC: Support explicit language flags
* NVHPC: Support Ninja dependency scanning
CMake 3.20.2
* ci: pay attention to the machine load when running tests
* ci: limit builds by machine load
* Help: Add 3.20 release note for error on unknown arguments
* gitlab-ci: equally delay all jobs on integration branches
* Autogen: Restore mocs_compilation in OBJECT libraries
* Help: Fix typos in cmake-compile-features(7)
* Help: Do not recommend WCDH in cmake-compile-features(7)
* Intel: Update Classic compiler version detection for 2021
* IntelLLVM: Add special case for ifx 2021.1 version extraction
* Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform
* Help: Document special cases for if(IS_ABSOLUTE)
* Add missing 'not' in error messages
* KWIML 2021-04-21 (49d91529)
* autogen: fix race in depfile parsing
* Ninja Multi-Config: Correctly generate POST_BUILD custom targets
* BinUtils: Restore toolchain prefix detection from compiler name 'c++'
* OpenBSD: Fix system feature definitions
CMake 3.20.1
* Help: Add Q_NAMESPACE_EXPORT to CMAKE_AUTOMOC_MACRO_NAMES default values
* FindHDF5: search for the new Fortran HL library name
* gitlab-ci: Update Windows builds to MSVC 19.28-16.9 toolset
* FindIntl: Fix detection of intl built in to C library
* GNUInstallDirs: Clarify that CMAKE_INSTALL_<dir> may be absolute
* Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output
* Ninja Multi-Config: Fix crash on custom command config with no output
* Tests: Add RunCMake helper to run a plain script
* Help: CMAKE_APPLE_SILICON_PROCESSOR cannot be set in a toolchain file
* gitlab-ci: Tell CDash when a test-ext job is done
* Help: Document in add_library how to import libraries with SONAME
* libarchive: Use uint8_t instead of u_char
* Utilities/Release: Add script to generate a table of files
* Utilities/Release: Add deprecation fields to File Table v1
* UseSWIG: Transform swig depfile to match Ninja generator paths
* ci: add jq and DevIL to Debian and Fedora base images
* ci: Enable jq-based tests on Linux builds
* BinUtils: Avoid clobbering a variable named without a private prefix
* Makefiles: Fix dependency extraction with CUDA < 10.2 and host compiler
* FindBLAS: Fix detection of OpenMP as dependency of BLA_STATIC
* Restore support for backslashes in initial language-wide flags
* CPack: Validate and document NSIS branding text trim positions
* Help: Custom OUTPUT and BYPRODUCTS genexes cannot refer to targets
* Tests: Remove redundant files for configure_file() tests
* Tests: Check host platform instead of target for running stat
* Cleanup: Fix misspelt name of local C++ variable
* Help: Clarify permission-related command options
* Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too
* Android: Fix search for binutils
* Cray: Detect Fortran compiler version patch level if available
* Ninja Multi-Config: Include configs in long CC scripts
* autogen: Don't include SKIP_AUTOMOC files in depfile
* Tests: Add test for Ninja automoc dependency cyle
* Makefiles dependencies: normalize windows paths
* CUDA Device link: Ensure all link options are correctly formatted
* Genex: $<HOST_LINK:> and $<DEVICE_LINK:> must be usable in try_compile
* FindMPI: avoid host link options to be propagated to device link step
* UseSWIG: Run using policy settings from includer
* cmCommandLineArgument: correctly compute next parse index
* CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths"
* CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths
* FindIntl: Improve documentation formatting
* Help: Clarify IMPORTED_LOCATION documentation
CMake 3.20 Release Notes
************************
Changes made since CMake 3.19 include the following.
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 "<COMMAND_CONFIG:...>" and
"<OUTPUT_CONFIG:...>" 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_<LANG>_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 "<LANG>_CLANG_TIDY" target property and the associated
"CMAKE_<LANG>_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 <bool>" 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_<compName>_PACKAGE_ICON" allow package icons to be
specified by local files.
* "CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION" and
"CPACK_NUGET_<compName>_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_<compName>_PACKAGE_LICENSE_FILE_NAME" allow licenses
to be specified by local files.
* "CPACK_NUGET_PACKAGE_LANGUAGE" and
"CPACK_NUGET_<compName>_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_<LANG>_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_<compName>_PACKAGE_ICONURL" have been deprecated;
replace with a reference to a local icon file.
* "CPACK_NUGET_PACKAGE_LICENSEURL" and
"CPACK_NUGET_<compName>_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".
CMake 3.19.7
* 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
* Cray: Enable Cray compiler wrapper detection on all platforms
CMake 3.19.6
* Intel: Make explicit Fortran preprocessing under Ninja more robust
* Tests: Update for upstream ninja change to write status on stderr
* CMakePresets.json: Remove undocumented support for comments
* FindPython: fix erroneous variable handling
3.19.5
When IOS_INSTALL_COMBINED is enabled and the Xcode generator is used, it is now possible to initiate an install or package creation by running cmake --install or cpack from the command line. When using the Xcode new build system, these are the only supported methods due to a limitation of Xcode. Initiating these operations by building the install or package targets in Xcode is only supported when using the legacy build system.
The framework handling introduced in 3.19.0 as part of supporting Xcode’s Link Binaries With Libraries build phase broke the ability to switch between device and simulator builds without reconfiguring. That capability has now been restored.
CMake 3.19.4
* FindHDF5: avoid writing to the output when testing h5cc
* FindHDF5: silence STATUS messages when found with QUIET
* GetPrerequisites: Include weak macOS dependencies
* file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected
* 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
* IRSL: Install msvcp${v}${d}_atomic_wait.dll if available with CRT
* Restore support for cross-compiling CMake itself
* VS: Generalize Win10 max SDK version to all VS generators
CMake 3.19.3
* 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+
* Help: Fix Sphinx not recognising list in XCODE_LINK_BUILD_PHASE_MODE
* FetchContent: Relative SOURCE_DIR override cannot be a hard error
* FindMPI: remove single quotes from include path
* Utilities/Release: Add docker specs for Linux aarch64 binaries
* gitlab-ci: add jobs to make Linux release packages for aarch64 on 3.19 branch
* FindHDF5: Fix finding both debug and release libs
* cmake-gui: Restore linking of Qt resources
* cmMakefile: Don't expand bracket arguments in --trace-expand
CMake 3.19.2
* Compiler/TI: Fix C standard flags in C-only project
* execute_process: Improve COMMAND_ERROR_IS_FATAL error capture scenarios
* 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
* 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
* 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()
* PCH: Fix compiler errors on iOS multi-arch using Ninja Multi-Config
* export: Do not fail generation for separate namelink only case
* Cray: Fix Cray compiler detection on new platforms
* FPHSA: ensure it can be used outside 'find_package'
* Clang on Windows: 'LINKER:' prefix must be honored
* CMakePackageConfigHelpers: Relax restrictions on version range
* CUDA: Fix user-set architectures during detection with Visual Studio
* macOS: Add architecture flags only for native ASM dialect
* 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
* Help: Fix presets typo (longDescription to displayName)
* QNX: Do not disable compiler extensions for CMake itself
* llvm-rc: Force C language for the clang gnu frontend
* llvm-rc: Add CMAKE_VFS_OVERLAY to the preprocessing flags
CMake 3.19.1
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
cmGlobalGenerator: FindMakeProgram() at a generator-specific time
cmFileTime: Fix overflow on time computation
Help: Fix ‘… versionadded’ directives for CTEST_CUSTOM_* variables
CUDA: Clang CUDA 11.1 support
CUDA: Error if can’t determine toolkit library root
CMake 3.19 Release Notes
************************
Changes made since CMake 3.18 include the following.
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.
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_<LANG>_COMPILER" variable may now be used to store
“mandatory” compiler flags like the "CC" and other environment
variables.
* The "CMAKE_<LANG>_FLAGS_INIT" variable will now be considered during
the compiler identification check if other sources like
"CMAKE_<LANG>_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.
CMake 3.18.4
* FindJNI: Add aarch64 support
* VS: Populate `std:c{11,17}` flag table entries for v142
* OBJCXX: Fix regression for compiling cpp files as objcxx
* VS: Fix regression in C# source links
* FindPython: Fix erroneous regex in ABI check
* Clang: Look for llvm-lib when using MSVC-like front-end
* FindCUDA/select_compute_arch: Add CUDA 11.1 and SM86 support
CMake 3.18.3
* AutoGen: Fix moc and uic dependencies when building Qt itself
* foreach: Fix crash parsing integer out of range
* 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
* PCH: Mark CMake PCH source files as -x -header
* PCH: Fix 30s wait for VS2008 when used via -Tv90
* AutoMoc: Restore support for re-running after project file changes
* AutoMoc: Re-run moc if a dependency is missing
* file(GENERATE): Create output file structures for all directories first
* 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
* FindJNI: Add arm64 support
* 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
* FindMatlab: add R2020b => 9.9
* MSVC: Record support for c_static_assert
* CUDA: Support setting CUDA14/17 when using MSVC
* Implement cm::static_reference_cast by declval
Changes made since CMake 3.18.1:
* AutoGen: Fix over-specified direct dependencies of custom command
* AutoGen: Add test to check for correct AutoMoc dependencies
* FindMPI: Fix regression in pthread guard
* FPHSA: detect inclusion between find modules
* 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
* ExternalProject: Stop patch target from always appearing out-of-date
* ExternalProject: Stop configure target from always appearing out-of-date
* PCH: Avoid unnecessary 30s delay on MSBuild Generator with REUSE_FROM
* FindRuby: Add documentation for deprecated variables
* Autogen: Turn off moc path prefix generation by default
* Help: Add 3.18.2 release note about AUTOMOC_PATH_PREFIX default change
* Ninja: Restore shorter path to response files
* GoogleTest: Restore support for list arguments in TEST_EXECUTOR
* FindPython: ensure user's policies are respected
* FindPython: manage SOABI for all Python versions
* FindPython: enhance robustness of version extraction from library name
* MSVC: Record support for C11 and c_restrict
* CMakeFindBinUtils: Always consider plain binutils when not cross-compiling
* FindHDF5: fix compiler detection when HL is disabled
* llvm-rc: Fix quoting of path to cmake in CMAKE_RC_COMPILE_OBJECT
NetBSD stdio.h has a bug with visibility of functions, so we get errors:
error: '::vscanf' has not been declared
Define the other macro that can reach these definitions.
Issue already fixed by joerg in NetBSD stdio.h r1.35.
Some of the more significant changes in CMake 3.18 are:
* The “CUDA” language can now be compiled using Clang on non-Windows platforms.
Separable compilation is not yet supported on any platform.
* “cmake(1)” gained support for profiling of CMake scripts through the
parameters “–profiling-output” and “–profiling-format”.
* The “add_library()” and “add_executable()” commands learned to
create Alias Targets referencing non-“GLOBAL” Imported Targets.
* The “cmake_language()” command was added for meta-operations on
scripted or built-in commands, starting with a mode to “CALL” other
commands, and “EVAL CODE” to inplace evaluate a CMake script.
* The “file(CONFIGURE)” subcommand was created in order to replicate
the “configure_file()” functionality without resorting to a pre-
existing file on disk as input. The content is instead passed as a
string.
* The “find_program()”, “find_library()”, “find_path()” and
“find_file()” commands gained a new “REQUIRED” option that will stop
processing with an error message if nothing is found.
* A “CMAKE_CUDA_ARCHITECTURES” variable was added to specify CUDA
output architectures. Users are encouraged to use this instead of
specifying options manually, as this approach is compiler-agnostic.
The variable is initialized automatically when
“CMAKE_CUDA_COMPILER_ID” is “NVIDIA”. The variable is used to
initialize the new “CUDA_ARCHITECTURES” target property. See policy
“CMP0104”.
* The “UNITY_BUILD_MODE” target property was added to tell generators
which algorithm (“BATCH”, “GROUP”) to use for grouping included source
files.
* The “CheckLinkerFlag” module has been added to provide a facility to
check validity of link flags.
* The “$<DEVICE_LINK:…>” and “$<HOST_LINK:…>” “generator
expressions” were added to manage device and host link steps.
* The “$<LINK_LANGUAGE:…>” and “$<LINK_LANG_AND_ID:…>” “generator expressions” were added.
* “ctest(1)” gained a new “CTEST_RESOURCE_SPEC_FILE” variable, which
can be used to specify a resource specification file.
* “ccmake(1)” learned to read a “CCMAKE_COLORS” environment variable
to customize colors.
* On Windows, the “Ninja” and “Ninja Multi-Config” 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.
CMake 3.17.3
* PCH: Fix REUSE_FROM in multi-config generators
* ExternalProject: expose _ep_cache_args_script to the caller
* FindBoost: Add 1.73 to known versions
* bootstrap: Use 'tr' more portably
* FindBoost: Update MinGW compiler tag for Boost 1.73
* CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER
* Help: Add 3.17 release note for FindPkgConfig '-isystem' fix
* FindGTK2: Add harfbuzz target for dependency from pango
* VS: Fix using PCH from source with COMPILE_OPTIONS
* XL: Install our Fortran 'cpp' helper script with execute permission
* MSVC: Use 'pragma system_header' in PCH only on cl 19.13 and above
* Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers
* Objective C/C++: Honor CC and CXX env vars to select compiler
* Help: Add 3.17.3 release note for Objective C/C++ compiler selection
* cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache
* VS: Restore .sln support for VS Version Selector
* cm_cxx_features: Filter out libhugetlbfs warnings
* cm_cxx_features: Filter out 'icpc: command line warning 10121'
* CPack-deb: don't add a line with a dot to pkg desc
* Ninja Multi-Config: Make "install" targets depend on default configs
* FindPython: fix error on FPHSA call
* FindPython: ensure any specified version is correctly handled
* FindPython: use CMAKE specific variables to look-up debug library
* Help: clarify add_definitions() and add_compile_definitions() behavior
* Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability
* CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile
* CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
* Tests: Add coverage of ctest_test RETURN_VALUE and REPEAT
* CTest: Make sure NOT_RUN tests show up in the failed test log
* FindPkgConfig: also handle "-isystem" prefixes for include directories
* FindOpenSSL: Detect OpenSSL 3.0.0
CMake 3.17.2
* BoostScanDeps: Fix typo in numpy handling
* FindBoost: Simplify Boost_VERSION_STRING comparisons
* FindBoost: Add support for Boost 1.73
* iOS: Fix detection of supported SDK architectures
* FindPython: avoid autoderef in version comparisons
* FindPython: remove extra dereference
* AIX: Activate symbol export/import IBM i (OS400)
* Ninja: Document that Fortran support is available with Ninja 1.10+
* CPack: Do not recurse through directory symlinks
* target_precompile_headers: Fix documented example using genex
* Makefiles: Scan Objective C/C++ preprocessor dependencies
* Makefiles: Add Objective C/C++ compilations to compile_commands.json
* FindMPI: Add the pgi compiler wrapper names used by IBM Spectrum MPI
* Help: Fix unescaped asterisks in docs for SKIP_PRECOMPILE_HEADERS
* Help: Minor grammar cleanups of CMAKE_CURRENT_FUNCTION* docs
* Help: Add cross-references for CMAKE_CURRENT_FUNCTION* docs
* Help: Improve wording of CMAKE_CURRENT_FUNCTION_LIST_DIR docs
* Apple: Merge per-arch sysroot parameters if all are the same
* file(UPLOAD): Add default ca_certs
* Ninja: Remove config suffix from order-only target
* FindPython: fix python compiler validation
* FindPython: fix reason failure propagation
* FindBoost: Prevent warning with boost 1.73
* FindCUDAToolkit searches stub location last
CMake 3.17.1
* ExternalProject: allow `DOWNLOAD_NO_EXTRACT OFF`
* Makefiles: Fix silencing of nested calls for GNU make 4.3
* VS: Fix ClangCL toolset compiler path detection
* Ninja Multi-Config: Fix MSVC showincludes prefix detection
* CheckIPOSupported: Avoid polluting cache with common name 'result'
* CTest: Fix reported duration on timeout when grindchild keeps pipes open
* target_link_libraries: Fix regression in case of $ genex
* AIX: Install ExportImportList script with execute permission
* XL: C++14 language level flags are only available on Linux
* XL: Add comment clarifying why we pretend it has full C++11/14 support
* CPack/NSIS: Document and check requirement of at least NSIS 3.0
* Utilities/Release: Update to openssl 1.1.1f
* Apple: Improve handling of missing SDKs in CMAKE_APPLE_ARCH_SYSROOTS
* Apple: Fix mapping CMAKE_APPLE_ARCH_SYSROOTS to custom OSX_ARCHITECTURES
* cmCursesLongMessageForm: Factor out helper to draw message to form
* Help: Minor typos and formatting for XCODE_SCHEME_WORKING_DIRECTORY
* Help: Add missing XCODE_SCHEME_WORKING_DIRECTORY
* Help: Fix inaccuracies and omissions in MACHO_* property docs
* Help: Fix CMAKE_FIND_DEBUG_MODE list formatting
* Help: Improve discoverability of CMAKE_FIND_DEBUG_MODE
* cmake-gui: Fix use-after-free in Open-possible check
* Help: Fixed typo in CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
* Help: Move Ninja Multi-Config variable details into their respective pages
* Ninja: Make config uppercase in object order target
* llvm-rc: Enable preprocessing if CMAKE_RC_COMPILER_INIT is an absolute path
* FindPython: misc. fixes
* FindPython: fix variable spelling error
* FindPython: fix handling when FIND_VIRTUALENV == FIRST
* ccmake: Use incremental rendering for the logs
* llvm-rc: Select preprocessor from active languages
* llvm-rc: Write depfile to location specified by the generator
* llvm-rc: Print stderr output when calling tools through cmake_llvm_rc
* llvm-rc: Restore include path for data after explicit preprocessing
Some of the more significant changes in CMake 3.17 are:
“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.
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”.
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 “FindCUDAToolkit” module was added to find the CUDA Toolkit without enabling CUDA as a language.
“cmake(1)” gained a “–debug-find” command-line option to enable additional human-readable output on where find commands search.
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 “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 “FindPython” module has learned to find Python components in active virtual environments managed by “conda”.
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 :” 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”.
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 “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.
“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.
CMake 3.16.5
* libarchive: Fix WideCharToMultiByte output buffer size
* libarchive: Add support for UTF-8 locale on Windows
* Propagate backtraces from LINK_LIBRARIES through to link line items
* Help: Update CMake 3.16 release notes for 3.16.5
* Ninja: Do not use nvcc response files with non-nvcc tools
* install: Fix regression when using default destinations
* FindPython: Mark non-public cache entries INTERNAL in CMake 3.16
* FindPython: Do not cache computed result variables in CMake 3.16
* FindPkgConfig: set policies CMP0054 and CMP0057 to new
CMake 3.16.4
* ASM_MASM: Populate MSVC runtime library abstraction table
* VS: Tell VS 16.4 not to verify SYMBOLIC custom command inputs
* AIX: Restore pre-3.16 undocumented method to suppress exports with XL
* Android: Fix binutils selection with NDK r19+ unified toolchain
* VS: Do not use native unity builds on VS 2017 versions less than 15.8
* file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
* Help: Add more variable documentation to FindMPI
* CPack: Fix regression in Deb description
CMake 3.16.3
* FindOpenSSL: Fix ordering of dependency link flags
* GNUtoMS: Add search path for VS 2019 environment scripts
* IRSL: Install msvcp140_{1,2,codecvt_ids}.dll if available
* ObjC: Add _COMPILE_LAUNCHER support
* ObjC: Add VISIBLITY_INLINES_HIDDEN support
* Unity Build: include language in generated source file name
* PCH: No repeated path for internal generated PCH files (MSVC case)
* CTest: Improve error handling when reading resource spec file
* CPack: Fix regression in DEB generator description
* FindPython*: Fix erroneous target properties setting
* macOS: Add support for new Xcode 11 frameworks directory
* FindPython: ensure new Xcode framework for Python3 is detected
* FindPython: Add support for version 3.9
* Fortran: Add support for NAG Fortran submodules
* VS: Add Fortran link flag table entries for /OPT:*
* CUDA: Do not device link if target has no CUDA usage
* Autogen: Enable SKIP_UNITY_BUILD_INCLUSION on AUTORCC generated files
* FindMatlab: add R2019a and R2019b MATLAB_VERSIONS_MAPPING
* FindMatlab: in matlab_add_mex use the correct version file
CMake 3.16.2
VS: Fix support for v142 toolset minor versions in VS 16.5+
FindBLAS: Consider OpenBLAS with thread libraries only with C or CXX
FindBoost: Add support for Boost 1.72
Autogen: Revert processing of .hh files for compatibility
FindLAPACK: Fix support for LAPACK symbols inside BLAS libraries
PCH: Append pch header file to list of forced include files
Tests: Fix testCTestResourceSpec struct initialization for some compilers