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
CMake 3.16.1
* bootstrap: Add target_link_options command
* Check for support before adding bigtoc linker flag
* TestDriver: ignore strcpy call
* FindThreads: Restore hard-coded '-l' flag on library name
* PCH: Do not add #pragma system_header for Xcode generator
* Unity/PCH: Skip more target types when adding automatic sources
* Unity: Generic source file handling for all generators
* Unity: Proper handling of object libraries
* PCH: Use the target's PREFIX for building the pdb file name
* CTest Resource Allocation: Add test for spec file with no version
* FindwxWidgets: Add support for 3.1.3 on macOS
3.16.0:
New Features
============
Languages
---------
* CMake learned to support the Objective C ("OBJC") and Objective
C++ ("OBJCXX") languages. They may be enabled via the "project()"
and "enable_language()" commands. When "OBJC" or "OBJCXX" is
enabled, source files with the ".m" or ".mm", respectively, will be
compiled as Objective C or C++. Otherwise they will be treated as
plain C++ sources as they were before.
Compilers
---------
* The "Clang" compiler is now supported on "Solaris".
Platforms
---------
* On AIX, executables using the "ENABLE_EXPORTS" target property now
produce a linker import file with a ".imp" extension in addition to
the executable file. Plugins (created via "add_library()" with the
"MODULE" option) that use "target_link_libraries()" to link to the
executable for its symbols are now linked using the import file. The
"install(TARGETS)" command now installs the import file as an
"ARCHIVE" artifact.
* On AIX, runtime linking is no longer enabled by default. CMake
provides the linker enough information to resolve all symbols up
front. One may manually enable runtime linking for shared libraries
and/or loadable modules by adding "-Wl,-G" to their link flags (e.g.
in the "CMAKE_SHARED_LINKER_FLAGS" or "CMAKE_MODULE_LINKER_FLAGS"
variable). One may manually enable runtime linking for executables
by adding "-Wl,-brtl" to their link flags (e.g. in the
"CMAKE_EXE_LINKER_FLAGS" variable).
Command-Line
------------
* "cmake(1)" "-E" now supports "true" and "false" commands, which do
nothing while returning exit codes of 0 and 1, respectively.
* "cmake(1)" gained a "--trace-redirect=" command line option
that can be used to redirect "--trace" output to a file instead of
"stderr".
* The "cmake(1)" "--loglevel" command line option has been renamed
to "--log-level" to make it consistent with the naming of other
command line options. The "--loglevel" option is still supported to
preserve backward compatibility.
Commands
--------
* The "add_test()" command learned the option "COMMAND_EXPAND_LISTS"
which causes lists in the "COMMAND" argument to be expanded,
including lists created by generator expressions.
* The "file()" command learned a new sub-command,
"GET_RUNTIME_DEPENDENCIES", which allows you to recursively get the
list of libraries linked by an executable or library. This sub-
command is intended as a replacement for "GetPrerequisites".
* The "find_file()", "find_library()", "find_path()",
"find_package()", and "find_program()" commands have learned to
check the following variables to control searching
* "CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH" - Controls the searching
the cmake-specific environment variables.
* "CMAKE_FIND_USE_CMAKE_PATH" - Controls the searching the cmake-
specific cache variables.
* "CMAKE_FIND_USE_CMAKE_SYSTEM_PATH" - Controls the searching
cmake platform specific variables.
* "CMAKE_FIND_USE_PACKAGE_ROOT_PATH" - Controls the searching of
"_ROOT" variables.
* "CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH" - Controls the
searching the standard system environment variables.
* The "find_package()" command has learned to check the following
variables to control searching
* "CMAKE_FIND_USE_PACKAGE_REGISTRY" - Controls the searching the
cmake user registry.
* The "message()" command learned indentation control with the new
"CMAKE_MESSAGE_INDENT" variable.
* The "target_precompile_headers()" command was added to specify a
list of headers to precompile for faster compilation times.
Variables
---------
* The "CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS" variable has been
introduced to optionally initialize the
"CUDA_RESOLVE_DEVICE_SYMBOLS" target property.
* The "CMAKE_ECLIPSE_RESOURCE_ENCODING" variable was added to
specify the resource encoding for the the "Eclipse CDT4" extra
generator.
Properties
----------
* The "BUILD_RPATH" and "INSTALL_RPATH" target properties now
support "generator expressions".
* The "INSTALL_REMOVE_ENVIRONMENT_RPATH" target property was added
to remove compiler-defined "RPATH" entries from a target. This
property is initialized by the
"CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH" variable.
* The "PRECOMPILE_HEADERS" target property was added to specify a
list of headers to precompile for faster compilation times. Set it
using the "target_precompile_headers()" command.
* The "UNITY_BUILD" target property was added to tell generators to
batch include source files for faster compilation times.
* The "VS_CONFIGURATION_TYPE" target property now supports
"generator expressions".
* The "VS_DPI_AWARE" target property was added to tell Visual Studio
Generators to set the "EnableDpiAwareness" property in ".vcxproj"
files.
* The "XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING" target property was
added to tell the "Xcode" generator to set the value of the "Allow
debugging when using document Versions Browser" schema option.
Modules
-------
* The "FindDoxygen" module "doxygen_add_docs()" command gained a new
"USE_STAMP_FILE" option. When this option present, the custom
target created by the command will only re-run Doxygen if any of the
source files have changed since the last successful run.
* The "FindGnuTLS" module now provides an imported target.
* The "FindPackageHandleStandardArgs" module
"find_package_handle_standard_args()" command gained a new
"REASON_FAILURE_MESSAGE" option to specify a message giving the
reason for the failure.
* The "FindPkgConfig" module "pkg_search_module()" macro now defines
a "_MODULE_NAME" result variable containing the first
matching module name.
* The "FindPython3" and "FindPython" modules gained options to
control which "ABIs" will be searched.
* The "FindPython3", "FindPython2", and "FindPython" modules now
support direct specification of artifacts via cache entries.
Autogen
-------
* When using "AUTOMOC", CMake now generates the "-p" path prefix
option for "moc". This ensures that "moc" output files are
identical on different build setups (given, that the headers
compiled by "moc" are in an "include directory"). Also it ensures
that "moc" output files will compile correctly when the source
and/or build directory is a symbolic link.
The "moc" path prefix generation behavior can be configured by
setting the new "CMAKE_AUTOMOC_PATH_PREFIX" variable and/or
"AUTOMOC_PATH_PREFIX" target property.
CTest
-----
* "ctest(1)" now has the ability to serialize tests based on
resource requirements for each test. See Resource Allocation for
details.
* A new test property, "SKIP_REGULAR_EXPRESSION", has been added.
This property is similar to "FAIL_REGULAR_EXPRESSION" and
"PASS_REGULAR_EXPRESSION", but with the same meaning as
"SKIP_RETURN_CODE". This is useful, for example, in cases where the
user has no control over the return code of the test. For example,
in Catch2, the return value is the number of assertion failed,
therefore it is impossible to use it for "SKIP_RETURN_CODE".
CPack
-----
* "cpack(1)" learned support for multiple configurations for "-C"
option.
* The "CPack DEB Generator" is now able to format generic text
(usually used as the description for multiple CPack generators)
according to the Debian Policy Manual. See the
"CPACK_PACKAGE_DESCRIPTION_FILE" and
"CPACK_DEBIAN__DESCRIPTION" variables.
* The "CPack Archive Generator" learned to generate ".tar.zst"
packages with Zstandard compression.
Deprecated and Removed Features
===============================
* An explicit deprecation diagnostic was added for policy "CMP0067"
("CMP0066" 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 "CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY" variable has been
deprecated. Use the "CMAKE_FIND_USE_PACKAGE_REGISTRY" variable
instead.
* The "GetPrerequisites" module has been deprecated, as it has been
superceded by "file(GET_RUNTIME_DEPENDENCIES)".
* The "CPACK_INSTALL_SCRIPT" variable has been deprecated in favor
of the new, more accurately named "CPACK_INSTALL_SCRIPTS" variable.
Other Changes
=============
* The "cmake(1)" "-C " option now evaluates the
initial cache script with "CMAKE_SOURCE_DIR" and "CMAKE_BINARY_DIR"
set to the top-level source and build trees.
* The "cmake(1)" "-E remove_directory" command-line tool, when given
the path to a symlink to a directory, now removes just the symlink.
It no longer removes content of the linked directory.
* The "ctest(1)" "--build-makeprogram" command-line option now
specifies the make program used when configuring a project with the
"Ninja" generator or the Makefile Generators.
* The "ExternalProject" module "ExternalProject_Add()" command has
been updated so that "GIT_SUBMODULES """ initializes no submodules.
See policy "CMP0097".
* The "FindGTest" module has been updated to recognize MSVC build
trees generated by GTest 1.8.1.
* The "project()" command no longer strips leading zeros in version
components. See policy "CMP0096".
* The Qt Compressed Help file is now named "CMake.qch", which no
longer contains the release version in the file name. When CMake is
upgraded in-place, the name and location of this file will remain
constant. Tools such as IDEs, help viewers, etc. should now be able
to refer to this file at a fixed location that remains valid across
CMake upgrades.
* "RPATH" entries are properly escaped in the generated CMake
scripts used for installation. See policy "CMP0095".
* When using "CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS" on Windows the auto-
generated exports are now updated only when the object files
providing the symbols are updated.
CMake 3.15.5
* Help: Fix COMPILE_LANG_AND_ID genex example
* VS: Fix support for v142 toolset minor versions
* Xcode: Restore CMAKE_XCODE_GENERATE_SCHEME for custom targets
* VS: Tell VS 16.4 not to verify CMake-provided custom command outputs
* VS: Add toolset v142 CSharp flag table
* IRSL: Prefer MSVC runtime libraries from newest toolset first
* IRSL: Install vcruntime140_1.dll if available
CMake 3.15.3
* Flang: Implement MSVC runtime library abstraction
* CTest: Fix --show-only=json-v1 output with REQUIRED_FILES property
* cmGlobalGenerator: Fix CheckCompilerIdCompatibility local var lifetime
* cmAffinity: Add include for CPU_ZERO on Alpine Linux
* find_path: Fix crash on empty old-style list of names
* fileapi: Fix codemodel v2 target file name for CMP0037 OLD behavior
* FindBoost: Simplify conditional block for last known version
* FindBoost: Remove incorrect 1.70 timer dependency
* FindBoost: Unwrap compatibility INTERFACE targets for legacy variables
* FindBoost: Add support for Boost 1.71
* FindBoost: Clarify role of legacy variables in warning message
* FindBoost: Tolerate future Boost INTERFACE libraries
* CrayPrgEnv: Change default linking mode based on PE version
* ccmake: handle cache entries with empty STRINGS property
* libarchive: We now require at least version 3.3.3
* FindMPI: Restore MPI__COMPILE_FLAGS and MPI__COMPILE_OPTIONS
* Ninja: Add support for ADDITIONAL_CLEAN_FILES in custom targets
* Tests: Extend MakeClean test to test various target types
* Autogen: Fix AUTOUIC segfault, when file includes colliding ui_*.h file
Changes made since CMake 3.15.0:
* CTest: Generate Done.xml before calculating its hash
* VS: Place intermediate files in the "ASM List Location" next to objects
* MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not set
* Clang: For MSVC ABI do not use modes older than C++14
* Tests: Revert "require C++14 for the Tutorial"
* Makefile: Fix regression in dependencies on relative includes
* Help: Add 3.15.1 release notes
* IRSL: Fix typo in v143 toolset version check
* IRSL: Fix discovery of VS 2019 v141 toolset redistributables
* FindPython: ensure interpreter is founded when cross-compiling
* Fix allocation in CROSSCOMPILING_EMULATOR evaluation
* FindMPI: Updated to use INTERFACE_LINK_OPTIONS
* FindMPI: make sure computed link flags are not de-duplicated
* Support per-language library link flags
* Swift: Add library search paths for dependencies
* Swift: add rules for static linking
* Swift: support multithreaded compilation
* Swift: support SONAME on ELFish targets
3.15.0:
New Features
============
Generators
----------
* The "Xcode" generator now supports per-target schemes. See the
"CMAKE_XCODE_GENERATE_SCHEME" variable and "XCODE_GENERATE_SCHEME"
target property.
* The "Green Hills MULTI" generator has been updated:
* It now supports the "add_custom_command()" and
"add_custom_target()" commands.
* It is now available on Linux.
Languages
---------
* Preliminary support for the "Swift" language was added to the
"Ninja" generator:
* Use the "SWIFTC" environment variable to specify a compiler.
* The "Swift_DEPENDENCIES_FILE" target property and
"Swift_DEPENDENCIES_FILE" source file property were added to
customize dependency files.
* The "Swift_MODULE_NAME" target property was added to customize
the Swift module name.
* The "Swift_DIAGNOSTICS_FILE" source property was added to
indicate where to write the serialised Swift diagnostics.
The Swift support is experimental, not considered stable, and may
change in future releases of CMake.
Compilers
---------
* The "Clang" compiler variant on Windows that targets the MSVC ABI
but has a GNU-like command line is now supported.
* Support for the Clang-based ARM compiler was added with compiler
id "ARMClang".
* Support was added for the IAR compiler architectures Renesas RX,
RL78, RH850 and Texas Instruments MSP430.
* Support was added for the IAR compilers built for Linux (IAR
BuildLx).
Command-Line
------------
* The "CMAKE_GENERATOR" environment variable was added to specify a
default generator to use when "cmake(1)" is run without a "-G"
option. Additionally, environment variables
"CMAKE_GENERATOR_PLATFORM", "CMAKE_GENERATOR_TOOLSET", and
"CMAKE_GENERATOR_INSTANCE" were created to configure the generator.
* The "cmake(1)" "--build" tool "--target" parameter gained support
for multiple targets, e.g. "cmake --build . --target Library1
Library2". It now also has a short form "-t" alias, e.g. "cmake
--build . -t Library1 Library2".
* The "cmake(1)" command gained a new "--install" option. This may
be used after building a project to run installation without using
the generated build system or the native build tool.
* The "cmake(1)" command learned a new CLI option "--loglevel".
* The "cmake(1)" "-E remove_directory" command-line tool learned to
support removing multiple directories.
* The "cmake(1)" "-E tar" tool has been improved:
* It now continues adding files to an archive even if some of the
files are not readable. This behavior is more consistent with the
classic "tar" tool.
* It now parses all flags, and if an invalid flag was provided, a
warning is issued.
* It now displays an error if no action flag was specified, along
with a list of possible actions: "t" (list), "c" (create) or "x"
(extract).
* It now supports extracting ("-x") or listing ("-t") only
specific files or directories.
* It now supports Zstandard compression with a "--zstd" option.
Zstandard was designed to give a compression ratio comparable to
that of the DEFLATE (zip) algorithm, but faster, especially for
decompression.
Commands
--------
* The "add_custom_command()" and "add_custom_target()" commands
gained a new "JOB_POOL" option that works with the "Ninja" generator
to set the pool variable on the build statement.
* The "add_library()" command "ALIAS" option learned to support
import libraries of the "UNKNOWN" type.
* The "cmake_parse_arguments()" command gained an additional
"_KEYWORDS_MISSING_VALUES" output variable to report keyword
arguments that were given by the caller with no values.
* The "execute_process()" command gained a "COMMAND_ECHO" option and
supporting "CMAKE_EXECUTE_PROCESS_COMMAND_ECHO" variable to enable
echoing of the command-line string before execution.
* The "file(INSTALL)" command learned a new argument,
"FOLLOW_SYMLINK_CHAIN", which can be used to recursively resolve and
install symlinks.
* "list()" learned new sub-commands: "PREPEND", "POP_FRONT" and
"POP_BACK".
* The "message()" command learned new types: "NOTICE", "VERBOSE",
"DEBUG" and "TRACE".
* The "string()" learned a new sub-command "REPEAT".
Variables
---------
* The "CMAKE_CROSSCOMPILING_EMULATOR" variable and corresponding
"CROSSCOMPILING_EMULATOR" target property learned to support
arguments to the emulator.
* The "CMAKE_FIND_PACKAGE_PREFER_CONFIG" variable was added to tell
"find_package()" calls to look for a package configuration file
first even if a find module is available.
* The "CMAKE_FRAMEWORK" variable was added to initialize the
"FRAMEWORK" property on all targets.
* The "CMAKE_VS_JUST_MY_CODE_DEBUGGING" variable and
"VS_JUST_MY_CODE_DEBUGGING" target property were added to enable the
Just My Code feature of the Visual Studio Debugger when compiling
with MSVC cl 19.05 and higher.
* The "CMAKE_MSVC_RUNTIME_LIBRARY" variable and
"MSVC_RUNTIME_LIBRARY" target property were introduced to select the
runtime library used by compilers targeting the MSVC ABI. See policy
"CMP0091".
* The "CMAKE_PROJECT_INCLUDE" and "CMAKE_PROJECT_INCLUDE_BEFORE"
variables were added to allow injection of custom code at the sites
of "project()" calls without knowing the project name a priori.
Properties
----------
* The "ADDITIONAL_CLEAN_FILES" target property and
"ADDITIONAL_CLEAN_FILES" directory property were added. They allow
to register additional files that should be removed during the clean
stage.
* The "PUBLIC_HEADER" and "PRIVATE_HEADER" properties may now be set
on Interface Libraries. The headers specified by those properties
can be installed using the "install(TARGETS)" command by passing the
"PUBLIC_HEADER" and "PRIVATE_HEADER" arguments respectively.
* The "VS_PACKAGE_REFERENCES" target property was added to tell
Visual Studio Generators to add references to "nuget" packages.
* The "VS_PROJECT_IMPORT" target property was added to allow managed
Visual Studio project files to import external ".props" files.
* The "VS_NO_SOLUTION_DEPLOY" target property was added to tell
Visual Studio Generators whether to deploy an artifact to the WinCE
or Windows Phone target device.
Modules
-------
* The "FindBoost" module was reworked to expose a more consistent
user experience between its “Config” and “Module” modes and with
other find modules in general.
* A new imported target "Boost::headers" is now defined (same as
"Boost::boost").
* New output variables "Boost_VERSION_MACRO",
"Boost_VERSION_MAJOR", "Boost_VERSION_MINOR",
"Boost_VERSION_PATCH", and "Boost_VERSION_COUNT" were added.
* The "QUIET" argument passed to "find_package()" is no longer
ignored in config mode. Note that the CMake package shipped with
Boost "1.70.0" ignores the "QUIET" argument passed to
"find_package()". This is fixed in the next Boost release.
* The input switch "Boost_DETAILED_FAILURE_MSG" was removed.
* "Boost_VERSION" now reports the version in "x.y.z" format in
module mode. See policy "CMP0093".
* The "FindCups" module now provides imported targets.
* The "FindEnvModules" module was added to use Lua- and TCL-based
environment modules in CTest Scripts.
* The "FindGLEW" module now provides an interface more consistent
with what upstream GLEW provides in its own CMake package files.
* The "FindPkgConfig" now populates "INTERFACE_LINK_OPTIONS"
property of imported targets with other (non-library) linker flags.
* The "FindPostgreSQL" module learned to find debug and release
variants separately.
* Modules "FindPython3", "FindPython2" and "FindPython" gained
additional lookup strategies and controls, and a new default. See
policy "CMP0094".
* Modules "FindPython", "FindPython2" and "FindPython3" gain a new
target (respectively "Python::Module", "Python2::Module" and
"Python3::Module") which can be used to develop Python modules.
* Modules "FindPython3", "FindPython2" and "FindPython" gain
capability to control how virtual environments are handled.
* The "UseSWIG" module learned to manage alternate library names by
passing "-interface " for "python" language or
"-dllimport " for "CSharp" language to the "SWIG"
compiler.
Generator Expressions
---------------------
* The "generator expressions" "C_COMPILER_ID", "CXX_COMPILER_ID",
"CUDA_COMPILER_ID", "Fortran_COMPILER_ID", "COMPILE_LANGUAGE",
"COMPILE_LANG_AND_ID", and "PLATFORM_ID" learned to support matching
one value from a comma-separated list.
CTest
-----
* The "ctest_submit()" command learned a new option: "BUILD_ID".
This can be used to store the ID assigned to this build by CDash to
a variable.
* The "ctest_update()" command learned to honor a new variable:
"CTEST_UPDATE_VERSION_OVERRIDE". This can be used to specify the
current version of your source tree rather than using the update
command to discover the current version that is checked out.
CPack
-----
* The "CPack IFW Generator" gained a new
"CPACK_IFW_PACKAGE_STYLE_SHEET" variable to customize the installer
stylesheet.
Deprecated and Removed Features
===============================
* The "cmake-server(7)" mode has been deprecated and will be removed
from a future version of CMake. Please port clients to use the
"cmake-file-api(7)" instead.
* The "ADDITIONAL_MAKE_CLEAN_FILES" directory property is now
deprecated. Use the "ADDITIONAL_CLEAN_FILES" directory property
instead.
* The variable "CMAKE_AUTOMOC_RELAXED_MODE" is considered
deprecated. Support still exists but will be removed in future
versions.
* The "export(PACKAGE)" command now does nothing unless enabled via
"CMAKE_EXPORT_PACKAGE_REGISTRY". See policy "CMP0090".
* The "Xcode" generator now requires at least Xcode 5.
* An explicit deprecation diagnostic was added for policy "CMP0066"
("CMP0065" 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.
Other Changes
=============
* CMake learned how to compile C++14 with the IBM AIX XL compiler
and the SunPro compiler and to compile C++20 with the AppleClang
compiler.
* With MSVC-like compilers the value of "CMAKE__FLAGS" no
longer contains warning flags like "/W3" by default. See policy
"CMP0092".
* IBM Clang-based XL compilers that define "__ibmxl__" now use the
compiler id "XLClang" instead of "XL". See policy "CMP0089".
* The "file(REMOVE)" and "file(REMOVE_RECURSE)" commands were
changed to ignore empty arguments with a warning instead of treating
them as a relative path and removing the contents of the current
directory.
Changes in 3.14.5 since 3.14.4:
* FindBoost: Add compiler features for Boost Contract library
* libarchive: avoid b64_encode name conflict with Solaris built-in function
* FindThreads: Drop incorrect docs about usage with C++
* Do not exclude include directories made implicit by CPATH
* VS: Isolate custom command input/output generation scopes
* VS: Clarify name of custom commands AdditionalInputs variable
* VS: De-duplicate custom command dependencies
Changes in 3.14.4 since 3.14.3:
* FindBoost: Record compiler features for Boost 1.67 and above
* FindBoost: Fix compiler features for `fiber` and `context`
* iOS: Fix try_compile FILE_COPY not to fail
* target_link_libraries: Fix static library private deps in other dirs
* Help: Add 3.14.4 release notes
* FindSWIG: Support swig4.0
* Apple: Preserve high resolution mtime for static libraries
* Apple: Properly lookup XCTest for iOS and tvOS
* FindPython: NumPy: fix erroneous dependencies management
* FindPython: ensure variable Python_RUNTIME_LIBRARY_DIRS is set correctly
Changes in 3.14.3 since 3.14.2:
* FindOpenGL: look for GLVND libraries with a libglvnd suffix
* FindBoost: Add support for MSVC toolset version 14.2
* IRSL: Update redist directory for VS 2019 update 1
* VS: Provide the default platform name to project code
* FindQt3: Restore missing lib and bin path suffixes
* FindBoost: Fix detection with version suffixes on Gentoo
Changes in 3.14.2 since 3.14.1:
* MSVC: Fix MSVC_TOOLSET_VERSION for VS 2019 v142 toolset
* ARMCC: Do not identify ARMClang as ARMCC
* IRSL: Fix discovery of VS 2019 v142 toolset redistributables
* Tests: Clarify hand-written cases in RunCMake.ParseImplicitIncludeInfo
* Tests: Teach RunCMake.ParseImplicitIncludeInfo to match output by regex
* Fix implicit include directory extraction for adaptive relative paths
* Xcode: Factor out duplicate source group code into lambda
* Xcode: Avoid mutating App Bundle targets during generation
* cmake-gui: Fix icon overlay on windows
* Modules/CTest: Fix SubmitURL
* cmake-gui: Fix theme on Windows with Qt >= 5.10
Changes in 3.14.1 since 3.14.0:
* VS: Fix x64 host recognition by x86 cmake process
* find_program: Restore leading double slash on Windows network path
* Eclipse: Fix extra generator to not crash on interface libraries
* ARMCC: Fix identification of ARM compiler when it defines GNU macros
* Help: Clarify policy CMP0082 documentation
* Restore support for include_directories() in toolchain files
* CUDA: Tolerate square brackets in PROMPT environment variable
* cmake: Fix '-E copy foo .' to avoid clobbering file
* FindFontconfig: Convert module variables to camel case
* ParseImplicitIncludeInfo: Canonicalize implicit include dirs
* CPackIFW: Add missing cpack_ifw_configure_component_group option processing
* FindPython*: ensure correct architecture is selected.
* Autogen: Do not treat hard-coded -I/usr/include exclusion as implicit include
* ctest_coverage: fix out-of-bounds index in Jacoco parser
3.14.0:
New Features
Generators
* The Visual Studio 16 2019 generator was added. This is experimental and based on “Visual Studio 2019 Preview 4” because this version of VS has not been released.
* The Green Hills MULTI generator has been updated:
File-Based API
* A file-based api for clients to get semantic buildsystem information has been added.
Platforms
* CMake now supports Cross Compiling for iOS, tvOS, or watchOS using simple toolchain files.
Command-Line
* The cmake(1) Build Tool Mode (cmake --build) gained --verbose and -v options to specify verbose build output. Some generators such as Xcode don’t support this option currently.
* The cmake(1) -E compare_files command learned a new --ignore-eol option to specify that end-of-line differences (e.g. LF vs CRLF) should be ignored when comparing files.
* The cmake-gui(1) dialog gained new -S and -B arguments to explicitly specify source and build directories.
Commands
* The file() command learned a new sub-command, CREATE_LINK, which can be used to create hard or symbolic links.
* The file() command learned a new sub-command, READ_SYMLINK, which can be used to determine the path that a symlink points to.
* The file() command gained a SIZE mode to get the size of a file on disk.
* The find_package() command learned to optionally resolve symbolic links in the paths to package configuration files. See the CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS variable.
* The get_filename_component() command gained new LAST_EXT and NAME_WLE variants to work with the extension after the last . in the name.
* The if() command gained support for checking if cache variables are defined with the DEFINED CACHE{VAR} syntax.
* The install(CODE) and install(SCRIPT) commands learned to support generator expressions. See policy CMP0087.
* The install(TARGETS) command learned how to install to an appropriate default directory for a given target type, based on variables from the GNUInstallDirs module and built-in defaults, in lieu of a DESTINATION argument.
* The install(FILES) and install(DIRECTORY) commands learned a new set of parameters for installing files as a file type, setting the destination based on the appropriate variables from GNUInstallDirs and built-in defaults, in lieu of a DESTINATION argument.
* The list() operations REMOVE_ITEM, REMOVE_DUPLICATES, SORT, REVERSE, and FILTER all now accept a non-existent variable as the list since these operations on empty lists is also the empty list.
* The list() operation REMOVE_AT now indicates that the given indices are invalid for a non-existent variable or empty list.
* The try_compile() and try_run() commands gained a new LINK_OPTIONS option.
Variables
* A CMAKE_BUILD_RPATH_USE_ORIGIN variable and corresponding BUILD_RPATH_USE_ORIGIN target property were added to enable use of relative runtime paths (RPATHs). This helps achieving relocatable and reproducible builds that are invariant of the build directory.
Properties
* A CMAKE_ROLE global property was added to allow scripts to determine whether they’re running in project mode, script mode, find-package mode, CTest, or CPack.
* The CUDA_RESOLVE_DEVICE_SYMBOLS target property is now supported on shared library, module library, and executable targets. Previously it was only honored on static libraries.
* The EXCLUDE_FROM_ALL target property was created to override the setting of its directory. A target will now be built as part of “all” if its EXCLUDE_FROM_ALL property is set to OFF, even if its containing directory is marked as EXCLUDE_FROM_ALL.
* INTERFACE_POSITION_INDEPENDENT_CODE target property gains the support of generator expressions.
In case the compiler used advertises C++17 but uses a C++ library that
lacks some features, we'll need specific testing.
Unbreaks the build for: libstdc++ from 5.4 and clang 7.0
Submitted upstream: https://gitlab.kitware.com/cmake/cmake/merge_requests/3030/diffs
(No response yet)
From wizermil.
Changes in 3.13.4 since 3.13.3:
* Tests: add cases for providing Qt5Core_VERSION manually
* AutoGen: query Qt5 version from directory properties
* Revert "file: Allow DOWNLOAD/UPLOAD using alternate authentication
methods"
* Intel: Record support for relaxed constexpr by version 18.0.5
* macOS: Restore compatibility for setting FRAMEWORK after install()
* FindLAPACK: Distinguish check result variable name from FindBLAS
* macOS: Add missing explicit dependency on CoreServices framework
* cmake: Convert no source/build dir error to warning
* Help: Add 3.13.4 release note for no source/build dir error/warning
* FindDoxygen: Escape backslashes in default values
Changes in 3.13.3 since 3.13.2:
- VS: Exclude VS 2019 instances when using VS 2017 generator
- Tests: Add cases for -{C,D,U} without a source tree
- Tests: Add case for warning when AUTOMOC/UIC/RCC gets disabled
- cmake: Stop processing if -P option lacks file name
- cmake: Ensure source and binary dirs are set
- cmake: distinguish '-Cpath' from '-C path' in source dir parsing
- Autogen: Issue a warning when AUTOMOC/UIC/RCC gets disabled.
- BundleUtilities: Ensure target dir exists when creating symlinks
Changes in 3.13.2 since 3.13.1:
* CUDA: Add CUDA 10 (Turing) detection
* CUDA: Fix crash on linking to a CUDA target without CUDA enabled
* CPack/External: Fix status messages of staging scripts
* Autogen: Revert passing compiler implicit includes to moc
Changes in 3.13.1 since 3.13.0:
Fortran: Fix module dependency scanning with upper-case SUBMODULE
FindBoost: Restore finding without CXX language enabled
VS: Avoid crash with VS 2015 when all SDKs are higher than 10.0.14393.0
Autogen: Fix empty uic executable string
CMake 3.13.0:
The Visual Studio Generators for VS 2010 and above learned to
support the “INTERPROCEDURAL_OPTIMIZATION” target property and
supporting “CheckIPOSupported” module.
The “Green Hills MULTI” generator has been updated to include
support for platform, architecture, and toolset selection.
The “cmake” command gained the “-S <source_dir>” command line
option to specify the location of the source directory. This option
can be used independently of “-B”.
The “cmake” command gained the “-B <build_dir>” command line
option to specify the location of the build directory. This option
can be used independently of “-S”.
The “cmake” “-E create_symlink” command can now be used on
Windows.
The “target_link_directories()” command was created to specify
link directories for targets and their dependents.
The “target_link_options()” command was created to specify link
options for targets and their dependents.
The “target_link_libraries()” command may now be called to modify
targets created outside the current directory. See policy “CMP0079”.
The “install(TARGETS)” command learned to install targets created
outside the current directory.
A “VS_DEBUGGER_COMMAND_ARGUMENTS” target property was created to
set the debugging command line arguments with Visual Studio
Generators for VS 2010 and above.
A “VS_DEBUGGER_ENVIRONMENT” target property was created to set the
debugging environment with Visual Studio Generators for VS 2010 and
above.
The “option()” command now honors an existing normal variable of
the same name and does nothing instead of possibly creating a cache
entry (or setting its type) and removing the normal variable. See
policy “CMP0077”.
The “target_sources()” command now interprets relative source file
paths as relative to the current source directory. This simplifies
incrementally building up a target’s sources from subdirectories.
The “CMP0076” policy was added to provide backward compatibility
with the old behavior where required.
ccmake needs wsyncup(3) and since NetBSD 8.0 it is present on NetBSD.
Handle that via `USE_CURSES= wsyncup' and remove enforcements about
ncurses in CMakeLists.txt and Source/Checks/Curses/CMakeLists.txt.
Bump PKGREVISION
Changes in 3.12.3 since 3.12.2:
* CTest: Fix --test-load regression
* FindMPI: Restore MPI__COMPILE_FLAGS as a command-line string
* FindDoxygen: Ensure policy settings allow use of IN_LIST
* libarchive: Backport fix for build with LibreSSL 2.7
* libuv: do not require PATH_MAX to be defined
* VS: Fix CSharp flag selection when linking to a static C++ library
* CSharp: Fix regression in VS project type selection
* CTest: Fix regression in ctest_start()
* Help: TESTS property: clarify usage.
Changes in 3.12.2 since 3.12.1:
* Android: Add support for NDK r18
* CheckIPOSupported: Simplify result reporting logic
* CheckIPOSupported: Tolerate backslashes in output of failed checks
* VS: Restore CMakeLists.txt references in each target
* EXPORT_PROPERTIES: Add test for an undefined property
* EXPORT_PROPERTIES: Prevent null dereference for undefined property
* Help: Fix typo in clang-tidy example -checks option
* FindBoost: Fix context discovery for 1.60 and below
* FindCUDA: Do not find cublas_device on CUDA >= 9.2
* FindMatlab: Remove erroneous duplicate code
* CUDA: Avoid using deprecated cublas_device to identify device lib dirs
* cmState: Clear GlobVerificationManager state on Reset
Changes in 3.12.1 since 3.12.0:
- CSharp: Set CMAKE_CSharp_COMPILER_LOADED variable when language is enabled
- UseSWIG: Use CSharp language only if it is enabled
- Help: Add explicit <PackageName>_ROOT variable documentation
- Tests: Add case showing CMP0048 warning on injected project command
- project: Do not issue CMP0048 warnings on injected call
- CPack: Restore support for 0-valued version components
- FindCUDA/select_compute_arch: Restore two-component CUDA_VERSION
- GoogleTest: Ensure policy settings allow use of IN_LIST
- FindTCL: Add support for version 8.7
- FindPython*: fix erroneous behavior on multiple 'find_package' calls
- UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS
Changelog:
Changes made since CMake 3.11 include the following.
New Features
Generators
* The Visual Studio Generators for VS 2017 learned to support a version=14.##
option in the CMAKE_GENERATOR_TOOLSET value (e.g. via the cmake(1) -T
option) to specify a toolset version number.
Command-Line
* The cmake(1) Build Tool Mode (cmake --build) gained --parallel [<jobs>] and
-j [<jobs>] options to specify a parallel build level. They map to
corresponding options of the native build tool.
Commands
* The add_compile_definitions() command was added to set preprocessor
definitions at directory level. This supersedes add_definitions().
* The cmake_minimum_required() and cmake_policy(VERSION) commands now accept
a version range using the form <min>[...<max>]. The <min> version is
required but policies are set based on the older of the running CMake
version and the version specified by <max>. This allows projects to specify
a range of versions for which they have been updated and avoid explicit
policy settings.
* The file(GLOB) and file(GLOB_RECURSE) commands learned a new flag
CONFIGURE_DEPENDS which enables expression of build system dependency on
globbed directory’s contents.
* The file(TOUCH) and file(TOUCH_NOCREATE) commands were added to expose
TOUCH functionality without having to use CMake’s command-line tool mode
with execute_process().
* The find_package() command now searches a prefix specified by a
PackageName_ROOT CMake or environment variable. Package roots are
maintained as a stack so nested calls to all find_* commands inside find
modules also search the roots as prefixes. See policy CMP0074.
* The install() command learned an optional NAMELINK_COMPONENT parameter,
which allows you to change the component for a shared library’s namelink.
If none is specified, the value of COMPONENT is used by default.
* The list() command learned a JOIN sub-command to concatenate list’s
elements separated by a glue string.
* The list() command learned a SUBLIST sub-command to get a sublist of the
list.
* The list() command learned a TRANSFORM sub-command to apply various string
transformation to list’s elements.
* The project() command learned an optional HOMEPAGE_URL parameter which has
the effect of setting variables like PROJECT_HOMEPAGE_URL, <PROJECT-NAME>
_HOMEPAGE_URL and CMAKE_PROJECT_HOMEPAGE_URL.
* The string() command learned a JOIN sub-command to concatenate input
strings separated by a glue string.
* target_compile_options() and add_compile_options() commands gained a SHELL:
prefix to specify a group of related options using shell-like quoting.
* The target_link_libraries() command now supports Object Libraries. Linking
to an object library uses its object files in direct dependents and also
propagates usage requirements.
Variables
* The CMAKE_FOLDER variable was added to initialize the FOLDER property on
all targets.
* The CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION variable was defined to
initialize all DOTNET_TARGET_FRAMEWORK_VERSION target properties.
* CMAKE_PROJECT_VERSION* variables have been introduced:
+ CMAKE_PROJECT_VERSION
+ CMAKE_PROJECT_VERSION_MAJOR
+ CMAKE_PROJECT_VERSION_MINOR
+ CMAKE_PROJECT_VERSION_PATCH
+ CMAKE_PROJECT_VERSION_TWEAK
* The CMAKE_SUPPRESS_REGENERATION variable was extended to support the Ninja
and Makefile Generators. It is also now documented.
* CMAKE_VS_SDK_*_DIRECTORIES variables were defined to tell Visual Studio
Generators for VS 2010 and above how to populate fields in .vcxproj files
that specify SDK directories. The variables are:
+ CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
+ CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES
+ CMAKE_VS_SDK_INCLUDE_DIRECTORIES
+ CMAKE_VS_SDK_LIBRARY_DIRECTORIES
+ CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES
+ CMAKE_VS_SDK_REFERENCE_DIRECTORIES
+ CMAKE_VS_SDK_SOURCE_DIRECTORIES
* A MSVC_TOOLSET_VERSION variable was added to provide the MSVC toolset
version associated with the current MSVC compiler version in MSVC_VERSION.
Properties
* The COMMON_LANGUAGE_RUNTIME target property was introduced to configure the
use of managed C++ for Visual Studio Generators for VS 2010 and above. A
corresponding IMPORTED_COMMON_LANGUAGE_RUNTIME target property was added to
support C++/CLI for imported targets.
* The DOTNET_TARGET_FRAMEWORK_VERSION target property was introduced as
replacement for VS_DOTNET_TARGET_FRAMEWORK_VERSION, which is considered
deprecated now.
* An EXPORT_PROPERTIES target property was added to specify a custom list of
target properties to include in targets exported by the install(EXPORT) and
export() commands.
* The PDB_OUTPUT_DIRECTORY property learned to support generator expressions.
* A TESTS directory property was added to hold the list of tests defined by
the add_test() command.
* A VS_DEBUGGER_COMMAND target property was created to set the debugging
command line with Visual Studio Generators for VS 2010 and above.
* HLSL source file properties VS_SHADER_DISABLE_OPTIMIZATIONS and
VS_SHADER_ENABLE_DEBUG gained support for generator expressions.
* HLSL source file property VS_SHADER_OBJECT_FILE_NAME has been added to the
Visual Studio Generators for VS 2010 and above. The property specifies the
file name of the compiled shader object.
Modules
* The FindALSA module now provides imported targets.
* The FindCURL module now provides imported targets.
* The FindJPEG module now provides imported targets.
* The FindLibXml2 module now provides imported targets.
* The FindMatlab module now supports the Matlab Runtime Compiler (MCR) for
compiling and linking matlab extensions.
* A FindODBC module was added to find an Open Database Connectivity (ODBC)
library.
* The FindPkgConfig module has learned to export the found libraries with
full path for direct consumption with the target_link_libraries() command.
* New FindPython3 and FindPython2 modules, as well as a new FindPython
module, have been added to provide a new way to locate python environments.
* The UseSWIG module gained a whole refresh and is now more consistent with
standard CMake commands to generate libraries and is fully configurable
through properties.
* The UseSWIG module learned to manage multiple behaviors through
UseSWIG_MODULE_VERSION variable to ensure legacy support as well as more
robust handling of SWIG advanced features (like %template).
* The UseSWIG module learned to support CSHARP variant wrapper files.
* The WriteCompilerDetectionHeader module gained a BARE_FEATURES option to
add a compatibility define for the exact keyword of a new language feature.
Generator Expressions
* A new $<GENEX_EVAL:...> and $<TARGET_GENEX_EVAL:target,...> generator
expression has been added to enable consumption of generator expressions
whose evaluation results itself in generator expressions.
* A new $<IN_LIST:...> generator expression has been added.
* A new $<TARGET_EXISTS:...> generator expression has been added.
* A new $<TARGET_NAME_IF_EXISTS:...> generator expression has been added.
CTest
* The ctest_start() command has been reworked so that you can simply call
ctest_start(APPEND) and it will read all the needed information from the
TAG file. The argument parsing has also been relaxed so that the order of
the arguments is less significant.
* A PROCESSOR_AFFINITY test property was added to request that CTest run a
test with CPU affinity for a set of processors disjoint from other
concurrently running tests with the property set.
CPack
* The CPack module now uses variables CMAKE_PROJECT_VERSION_MAJOR,
CMAKE_PROJECT_VERSION_MINOR and CMAKE_PROJECT_VERSION_PATCH to initialize
corresponding CPack variables.
* cpack(1) gained basic support for NuGet. See the CPackNuGet module.
Other
* The Compile Features functionality is now aware of C++ 20. No specific
features are yet enumerated besides the cxx_std_20 meta-feature.
* The Compile Features functionality is now aware of the availability of C
features in MSVC since VS 2010.
* The Compile Features functionality is now aware of C language standards
supported by Texas Instruments C compilers.
Deprecated and Removed Features
* The Visual Studio 8 2005 generator has been removed.
* CMake no longer produces <tgt>_LIB_DEPENDS cache entries for library
targets. See policy CMP0073.
Other Changes
* Include flags for directories marked as SYSTEM are now moved after
non-system directories. The -isystem flag does this automatically, so
moving them explicitly to the end makes the behavior consistent on
compilers that do not have any -isystem flag.
* Fortran dependency scanning now supports dependencies implied by Fortran
Submodules.
* The existence and functionality of the file ${CMAKE_BINARY_DIR}/
cmake_install.cmake has now been documented in the install() documentation
so that external packaging software can take advantage of CPack-style
component installs.
* The CheckIncludeFile module check_include_file macro learned to honor the
CMAKE_REQUIRED_LIBRARIES variable. See policy CMP0075.
* The CheckIncludeFileCXX module check_include_file_cxx macro learned to
honor the CMAKE_REQUIRED_LIBRARIES variable. See policy CMP0075.
* The CheckIncludeFiles module check_include_files macro learned to honor the
CMAKE_REQUIRED_LIBRARIES variable. See policy CMP0075.
* The cmake(1) -E copy_directory tool now fails when the source directory
does not exist. Previously it succeeded by creating an empty destination
directory.
* The UseSWIG module swig_add_library() command (and legacy swig_add_module
command) now set the prefix of Java modules to "" for MINGW, MSYS, and
CYGWIN environments.
3.11.4:
Windows: Restore support for running CMake through a symlink
ExternalProject: Fix cache generation when args end with "-NOTFOUND"
ExternalProject: Improve URL_HASH argument description
Xcode 9.4 triggers linker warnings that the C++ feature detection
code considers fatal. Simply ignore these warning by adding an entry
to the existing filter table.
Changes in 3.11.3:
* cmSystemTools: Revert GetRealPath implementation on Windows
* CPack: Fix cross-compilation of WiX generator
* TestDriver: Replace strncpy with strcpy
3.11.2:
Ninja: Do not add empty custom command for file(GENERATE) outputs
C++ feature checks: Filter out warnings caused by local configuration
libuv: linux/sparc64: use fcntl to set and clear O_NONBLOCK
FindCUDA: Fix regression in separable compilation without cublas
FindBoost: Remove extra indentation in 1.65/1.66 dependency block
add_library: Restore error on alias of non-global imported target
add_custom_{command,target}: Fix crash on empty expanded command
CMake 3.11.2
IRSL: Fix Intel library list for ifort-only setups
InstallRequiredSystemLibraries: Check for existence of mfcm dlls
FindBoost: Backport versioned python dependencies for v1.35 to v1.66
Fix CMAKE_DISABLE_SOURCE_CHANGES recognition of top of build tree
FindJava, FindJNI, UseJava: update for version 10 support
FindJava, FindJNI: Ensure most recent version is searched first
FindJava, FindJNI: fix erroneous regex, enhance registry lookup
Help: Specify COMPILE_OPTIONS and COMPILE_FLAGS source properties
usage
Qt4Macros: Use get_property/set_property
Qt4Macros: Don't AUTOMOC or AUTOUIC qt4-generated files
FindPkgConfig: do not unset unused variable
FindBLAS: do not write an imported target name into BLAS_LIBRARIES
Autogen: Register generated dependency files