Changes made since CMake 3.15 include the following.
- 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.
- The Clang compiler is now supported on Solaris.
- 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=<file> 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.
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.
- The cmake(1) -C <initial-cache> 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.
Changes made since CMake 3.16.0 include the following.
- CMake 3.16.0 and 3.16.1 processed .hh files with AUTOMOC.
This was a behavior change from CMake 3.15 and below that can break
existing projects, so it has been reverted as of 3.16.2.
The FindPython, FindPython2, and FindPython3
modules no longer create cache entries for Python{,2,3}_LIBRARY_RELEASE
and Python{,2,3}_LIBRARY_DEBUG. Those values are always computed from
other results and so should not be cached. The entries were created by
CMake 3.16.0 through 3.16.4 but were always FORCE-set and could not
be meaningfully edited by users.
Additionally, the modules no longer expose their internal _Python*
cache entries publicly. CMake 3.16.0 through 3.16.4 accidentally
made them visible as advanced cache entries.
- Selection of the Objective C or C++ compiler now considers the
CC or CXX environment variable if the
OBJC or OBJCXX environment variable is not set.
- The FindPkgConfig module now extracts include directories
prefixed with -isystem into the *_INCLUDE_DIRS variables and
INTERFACE_INCLUDE_DIRECTORIES target properties.
Previously they would be places in *_CFLAGS_OTHER variables and
INTERFACE_COMPILE_OPTIONS target properties.