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
Changes in 3.11.1 since 3.11.0:
Revert "CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES"
CPack: Fix crash on invalid generator name
Restore support for explicitly referenced CMakeLists.txt sources
Exclude "libgcc_eh" library files from implicit link libraries
Features: Record for VS 2017 through 15.6
Explicitly require LibUV 1.10 or higher to build CMake
bootstrap: Add option to enable/disable usage of system libuv
Fix crash with --trace-expand --warn-uninitialized together
FindOpenMP: Fix support for Intel on Windows
Autogen: Protected calls to cmSystemTools::CollapseCombinedPath
Autogen: Protected calls to cmSystemTools::Split/JoinPath
Autogen: Protected calls to cmSystemTools::GetFilenameWithoutLastExtension
Autogen: Protected calls to cmQtAutoGen::SubDirPrefix
Autogen: Protected calls to cmFilePathChecksum
Autogen: Use std::istreambuf_iterator for file so string reading
Autogen: Print moc/uic/rcc output to stdout
With pkgsrc built packages, the goal is to have the user's compiler
optimization flags set by the user using CFLAGS, etc. To that end,
the cmake Makefile has subst.mk code to "sed -e 's,-O.,,'" out opt.
flags in Modules/Compiler/*.cmake for cmake compiles with the
CMAKE_BUILD_TYPE set (e.g. to Release).
Unfortunately, this sed-based approach has two drawbacks: First, it
gets applied to packages build with cmake outside of pkgsrc (changing
the semantics of -DCMAKE_BUILD_TYPE=Release in an unexpected way by
remove -O flags from it). Second, the sed expression damages some
of the Modules/Compiler/*.cmake as not all opt flags match the "-O."
regular expression.
To address this we:
1. remove the subst.mk sed operation on Modules/Compiler/*.cmake
2. add a new config variable CMAKE_PKGSRC_BUILD_FLAGS that should
be set for pkgsrc-based cmake builds (e.g. in mk/configure/cmake.mk)
3. we add a patch for Modules/Compiler/GNU.cmake to look for
CMAKE_PKGSRC_BUILD_FLAGS and choose a set of non-opt compiler
flags when this is set (to provide the desired behavior under pksrc).
note that the GNU.cmake file is also used by clang. We can
make the corresponding changes to other compilers if desired.
The result is that cmake compiles under pkgsrc set CMAKE_PKGSRC_BUILD_FLAGS
and follow CFLAGS, etc. (bypassing CMAKE_BUILD_TYPE), but cmake compiles
outside of pkgsrc follow the standard cmake semantics for CMAKE_BUILD_TYPE.
Also, we no longer damage Modules/Compiler/*.cmake with sed.
Some of the more significant changes in CMake 3.11 are:
The Makefile Generators and the “Ninja” generator learned to add
compiler launcher tools along with the compiler for the “Fortran”
language (“C”, “CXX”, and “CUDA” were supported previously). See the
“CMAKE_<LANG>_COMPILER_LAUNCHER” variable and
“<LANG>_COMPILER_LAUNCHER” target property for details.
Visual Studio Generators learned to support the “COMPILE_LANGUAGE”
“generator expression” in target-wide “COMPILE_DEFINITIONS”,
“INCLUDE_DIRECTORIES”, “COMPILE_OPTIONS”, and “file(GENERATE)”. See
generator expression documentation for caveats.
The “Xcode” Generator learned to support the “COMPILE_LANGUAGE”
“generator expression” in target-wide “COMPILE_DEFINITIONS” and
“INCLUDE_DIRECTORIES”. It previously supported only
“COMPILE_OPTIONS” and “file(GENERATE)”. See generator expression
documentation for caveats.
“add_library()” and “add_executable()” commands can now be called
without any sources and will not complain as long as sources are
added later via the “target_sources()” command.
The “target_compile_definitions()” command learned to set the
“INTERFACE_COMPILE_DEFINITIONS” property on Imported Targets.
The “target_compile_features()” command learned to set the
“INTERFACE_COMPILE_FEATURES” property on Imported Targets.
The “target_compile_options()” command learned to set the
“INTERFACE_COMPILE_OPTIONS” property on Imported Targets.
The “target_include_directories()” command learned to set the
“INTERFACE_INCLUDE_DIRECTORIES” property on Imported Targets.
The “target_sources()” command learned to set the
“INTERFACE_SOURCES” property on Imported Targets.
The “target_link_libraries()” command learned to set the
“INTERFACE_LINK_LIBRARIES” property on Imported Targets.
The “COMPILE_DEFINITIONS” source file property learned to support
“generator expressions”.
A “COMPILE_OPTIONS” source file property was added to manage list
of options to pass to the compiler.
When using “AUTOMOC” or “AUTOUIC”, CMake now starts multiple
parallel “moc” or “uic” processes to reduce the build time. A new
“CMAKE_AUTOGEN_PARALLEL” variable and “AUTOGEN_PARALLEL” target
property may be set to specify the number of parallel “moc” or “uic”
processes to start. The default is derived from the number of CPUs
on the host.
CMake 3.10.3
* GoogleTest: Rename TIMEOUT parameter to avoid clash
* Autogen: Fix for the empty source file crash in 3.10.2
* ccmake: fix status line buffer overflow on very wide terminals
Changes in 3.10.2:
KWIML: Backport RISC-V update to CMake 3.10
FindPostgreSQL: Add support for PG10
cmGraphVizWriter: Updated to create and follow dependers for interface targets
Autogen: Fix for problematic nested list separator
Autogen: Ignore not existing source files in cmMakefile
3.10.1:
bootstrap: Check support for unordered_map from compiler mode
CPack: Fix macOS PKG component dependency information
CUDA: Treat /usr/include as an implicit include directory
server: Revert "Report backtraces in codemodel response"
CMake 3.10.1
FindMPI: Correct legacy variable handling
FindMPI: Fix multiple configure runs
FindMPI: Fix various legacy problems
IRSL: Fix MSVC variable deferencing
IAR: FindBinUtils should work for CXX as well as C
GoogleTest: Fix multiple discovery on same target
GoogleTest: Improve gtest_discover_tests messages
GoogleTest: Add timeout to discovery
GoogleTest: Add test for missing test executable
CUDA: Shared libraries on Darwin properly setup @rpath install_names
Autogen: Fix for AUTOMOC on macOS frameworks in CMake 3.10
Autogen: Tests: Add test for MacOS frameworks
Clang: Do not mistake clang-cl 6.0 for GNU-like clang
CMake 3.10 are:
The flang Fortran compiler is now supported, with compiler id
“Flang”.
Support for the MSVC ARM64 architecture was added. Visual Studio
2017 Update 4 and above offer an ARM64 toolchain.
The “include_guard()” command was introduced to allow guarding
CMake scripts from being included more than once. The command
supports “DIRECTORY” and “GLOBAL” options to adjust the
corresponding include guard scope. If no options given, include
guard is similar to basic variable-based check.
“FindMPI” received a major overhaul. It now features language specific
components, better Fortran support, and support for statically linked
MPI implementations.
A “FindOpenACC” module was added to detect compiler support for
OpenACC. Currently only supports PGI, GNU and Cray compilers.
The “FindOpenGL” module underwent numerous improvements. It has gained
support for GLVND and EGL on Linux. It now has import targets that
separate the OpenGL library and OpenGL contexts.
The “GoogleTest” module gained a new command
“gtest_discover_tests()” implementing dynamic (build-time) test
discovery.
When using “AUTOMOC” or “AUTOUIC”, source files that are
“GENERATED” will be processed as well. They were ignored by
“AUTOMOC” and “AUTOUIC” in earlier releases. See policy “CMP0071”.
A “CTEST_LABELS_FOR_SUBPROJECTS” CTest module variable and CTest
script variable were added to specify a list of labels that should
be treated as subprojects by CDash. To use this value in both the
CTest module and the ctest command line Dashboard Client mode (e.g.
“ctest -S”) set it in the “CTestConfig.cmake” config file.
CPack gained a “FREEBSD” generator for FreeBSD “pkg(8)”,
configured by the “CPackFreeBSD” module.
The CPack “DEB” generator, configured by the “CPackDeb” module,
was enabled on Windows. While not fully featured (due to the lack
of external UNIX tools) this will allow building basic cross-
platform Debian packages.
The “cmake(1)” “-E” mode gained support for “sha1sum”,
“sha224sum”, “sha256sum”, “sha384sum”, and “sha512sum”.
The “file(GENERATE)” command now interprets relative paths given
to its “OUTPUT” and “INPUT” arguments with respect to the caller’s
current binary and source directories, respectively. See policy
“CMP0070”.
Changes in 3.9.3 since 3.9.2:
* VS: Do not consider MAP_IMPORTED_CONFIG_ on non-imported targets
bootstrap: Fix running multiple times in-source
* vim: Remove default setting of expandtab
* FindBoost: Add support for Boost 1.65.0 and 1.65.1 to CMake 3.9
* CTest: fix crash if source file for coverage cannot be found
* Autogen: Backport autogen target dependency as file dependency fix
* Autogen: Tests: Backport tests for _autogen target dependencies
InstallRequiredSystemLibraries: Factor redist name into variable
InstallRequiredSystemLibraries: Find VS 2017 Update 3 redist directory
macOS: Revert default Hi-DPI support in applications
Ninja: Fix support for MSVC with non-English output
Xcode: Revert addition of "outputPaths" to custom command build phase
cmCPackDragNDropGenerator: Add missing include
cmake: Fix --find-package mode with imported targets
Genex: Fix TARGET_PROPERTY value of SOURCES
Android: Update for NDK r16
FindBoost: Revert "Simplify search in lists."
InstallRequiredSystemLibraries: Add support for future VS 2017 toolchains
Tests: Fix RunCMake.GeneratorExpression to run in CMake 3.9
FindOpenMP: Restore OpenMP_FOUND result variable
CUDA: Pass host compiler to nvcc while device linking
VS: Do not reference output assemblies if not possible for CSharp target
VS: Initialize CSharp flags consistently
Autogen: Restore AUTOUIC lookup paths from 3.8.2
Autogen: Update AUTOUIC documentation for search paths
Autogen: Extend AUTOUIC search paths test
Clang: Find version-suffixed LLVM/Clang binutils
FindCygwin: Fix regression when CYGWIN_INSTALL_PATH is already set
Utilities/Sphinx: Restore compatibility with Sphinx pre-1.2
Help: Silence warning about document not included in toctree
UseSWIG: Fix when Java is enabled as a language
VS: Fix VCTargetsPath detection
Android: Fix support for CMAKE_SYSROOT without CMAKE_SYSROOT_COMPILE
expat: Update script to get Expat 2.2.3
expat: Update CMake build for 2.2.3
Tests: Simplify RunCMake.find_package PackageRoot case regexes
find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9
find_package: Add missing PACKAGE_ROOT_PATH search path implementation.
find_package: Fix PACKAGE_ROOT test to check find_pacakge(CONFIG) mode.
find_package: Split PACKAGE_ROOT tests to work with smaller regex
FindJava: Allow early access version trailing string to be mixed case
FindBoost: pop policy stack before returning
expat 2017-08-02 (97c6bd01)
server: Fix crash on missing cache entries
FindJava: fix hint for windows jre 1.6
Help: Fix module and function names in CMP0069 examples
Autogen: Always create AUTOMOC/AUTOUIC include directory
* The “Visual Studio 14 2015” generator has been taught about a
change to the “v140” toolset made by a VS 2015 update. VS changed
the set of values it understands for the “GenerateDebugInformation”
linker setting that produces the “-DEBUG” linker flag variants.
* “CUDA” is now supported by the Visual Studio Generators for VS
2010 and above. This complements the existing support by the
Makefile Generators and the “Ninja” generator. CUDA 8.0.61 or higher
is recommended due to known bugs in the VS integration by earlier
versions.
* CMake is now aware of the “C++ standards” and “C standards” and
their associated meta-features for the following “compiler ids”:
“Cray”, “PGI”, and “XL”.
* The “add_library()” command “IMPORTED” option learned to support
Object Libraries.
* All “find_” commands now have a “PACKAGE_ROOT” search path group
that is first in the search heuristics. If a “find_” command is
called from inside a find module, then the CMake variable and
environment variable named “_ROOT” are used as prefixes
and are the first set of paths to be searched.
* The “install(TARGETS)” command learned a new “OBJECTS” option to
specify where to install Object Libraries.
* The “install(EXPORT)” command learned how to export Object
Libraries.
* A “BUILD_WITH_INSTALL_NAME_DIR” target property and corresponding
“CMAKE_BUILD_WITH_INSTALL_NAME_DIR” variable were added to control
whether to use the “INSTALL_NAME_DIR” target property value for
binaries in the build tree. This is for macOS “install_name” as
“BUILD_WITH_INSTALL_RPATH” is for “RPATH”.
* A “CUDA_PTX_COMPILATION” target property was added to Object
Libraries to support compiling to “.ptx” files instead of host
object files.
* A new “GoogleTest” module was added to provide the
“gtest_add_tests()” function independently of the “FindGTest”
module. The function was also updated to support keyword arguments,
with functionality expanded to allow a test name prefix and suffix
to be specified, the dependency on the source files to be optional
and the list of discovered test cases to be returned to the caller.
* The “Ninja” generator has loosened the dependencies of object
compilation. Object compilation now depends only on custom targets
and custom commands associated with libraries on which the object’s
target depends and no longer depends on the libraries themselves.
Source files in dependent targets may now compile without waiting
for their targets’ dependencies to link.
* Interprocedural optimization (IPO) is now supported for GNU and
Clang compilers using link time optimization (LTO) flags. See the
“INTERPROCEDURAL_OPTIMIZATION” target property and
“CheckIPOSupported” module.
* The “TARGET_OBJECTS” “generator expression” is now supported by
the “add_custom_command()” and “file(GENERATE)” commands.
* bootstrap: fix build on mingw-w64
* cmFileCommand: Fix build on mingw-w64
* GNUtoMS: Add search path for VS 2015 environment scripts
* GNUtoMS: Add search path for VS 2017 environment scripts
* FindDevIL: Restore IL_FOUND result variable
* FindOpenSSL: Restore support for crypto-only result
* source_group: Restore TREE support for relative paths
* VS: Fix debugging of C++ executables if CSharp is enabled
* FindOpenSSL: Add more library name alternatives
* FindBoost: Restore tolerance of backslashes in paths
* Tests: Fix FindModulesExecuteAll when KDE4 is installed
* Tests: Simplify CMakeOnly.AllFindModules policy settings
* FindBoost: Fix library directory for VS 2017
* CPack/RPM doc: CPACK_RPM_BUILDREQUIRES docs
* source_group: Fix TREE with root that is not current source dir
* FindMatlab: Add support for Matlab 2017a
* VS: Fix project reference inspection in VS IDE
* FindBoost: Allow testing for multiple compiler suffixes
* FindBoost: Support prebuilt Windows binaries from SourceForge
* VS2017: Verify Windows 8.1 SDK before using it
TagRunPath = 0 may cause client code such as cmSystemTools::RemoveRPath
to misbehave.
Define DT_RUNPATH to the expected value (29) instead.
bump pkgrevision
CMake learned to support CSharp (C#) as a first-class language that can be enabled via the project() and enable_language() commands. It is currently supported by the Visual Studio Generators for VS 2010 and above.
C# assemblies and programs can be added just like common C++ targets using the add_library() and add_executable() commands. References between C# targets in the same source tree may be specified by target_link_libraries() like for C++. References to system or 3rd-party assemblies may be specified by the target properties VS_DOTNET_REFERENCE_<refname> and VS_DOTNET_REFERENCES.
More fine tuning of C# targets may be done using target and source file properties. Specifically the target properties related to Visual Studio (VS_*) are worth a look (for setting toolset versions, root namespaces, assembly icons, ...).
CMake learned to support CUDA as a first-class language that can be enabled via the project() and enable_language() commands.
CUDA is currently supported by the Makefile Generators and the Ninja generator on Linux, macOS, and Windows. Support for the Visual Studio IDE is under development but not included in this release.
The NVIDIA CUDA Toolkit compiler (nvcc) is supported.
The Compile Features functionality now offers meta-features that request compiler modes for specific language standard levels (e.g. cxx_std_11). See CMAKE_C_KNOWN_FEATURES and CMAKE_CXX_KNOWN_FEATURES.
The Compile Features functionality is now aware of C++ 17. No specific features are yet enumerated besides the cxx_std_17 meta-feature.
The Compile Features functionality is now aware of the availability of C99 in gcc since version 3.4.
A new minimal platform file for Fuchsia was added.
The CodeBlocks extra generator may now be used to generate with NMake Makefiles JOM.
The Visual Studio Generators for VS 2013 and above learned to support a host=x64 option in the CMAKE_GENERATOR_TOOLSET value (e.g. via the cmake(1) -T option) to request use of a VS 64-bit toolchain on 64-bit hosts.
The Visual Studio Generators learned to treat files passed to target_link_libraries() whose names end in .targets as MSBuild “targets” files to be imported into generated project files.
...more...
CMake now supports Cross Compiling for Android with simple toolchain files.
The “Ninja” generator learned to conditionally support Fortran when using a “ninja” tool that has the necessary features. See generator documentation for details.
The “if()” command gained new boolean comparison operations “LESS_EQUAL”, “GREATER_EQUAL”, “STRLESS_EQUAL”, “STRGREATER_EQUAL”, “VERSION_LESS_EQUAL”, and “VERSION_GREATER_EQUAL”.
The “try_compile()” command source file signature now honors configuration-specific flags (e.g. “CMAKE_<LANG>_FLAGS_DEBUG”) in the generated test project. Previously only the default such flags for the current toolchain were used. See policy “CMP0066”.
“Toolchain files” may now set “CMAKE_EXE_LINKER_FLAGS_INIT”, “CMAKE_SHARED_LINKER_FLAGS_INIT”, and “CMAKE_MODULE_LINKER_FLAGS_INIT” variables to initialize the “CMAKE_EXE_LINKER_FLAGS”, “CMAKE_SHARED_LINKER_FLAGS”, and “CMAKE_MODULE_LINKER_FLAGS” cache entries the first time a language is enabled in a build tree.
CTest now supports test fixtures through the new “FIXTURES_SETUP”, “FIXTURES_CLEANUP” and “FIXTURES_REQUIRED” test properties. When using regular expressions or “–rerun-failed” to limit the tests to be run, a fixture’s setup and cleanup tests will automatically be added to the execution set if any test requires that fixture.
We no longer provide Linux i386 binaries for download from “cmake.org” for new versions of CMake.
Vim support files “cmake-indent.vim”, “cmake-syntax.vim”, and “cmake-help.vim” have been removed in favor of the files now provided from the vim-cmake-syntax project.
Support for building CMake itself with some compilers was dropped:
Visual Studio 7.1 and 2005 — superseded by VS 2008 and above
MinGW.org mingw32 — superseded by MSYS2 mingw32 and mingw64
CMake still supports generating build systems for other projects using these compilers.
Ben Boeckel (3):
Intel-C: declare support for gnu11
Intel-C: support gnu89 and gnu99 extension flags
Intel-C: standard flags are also supported in 12.0
Brad King (11):
Add script to update curl from upstream
curl: Update script to get curl 7.50.1
curl: Remove CMake-specific README
VS: Fix VS 2015 .vcxproj debug setting for Windows7.1SDK toolset
GetPrerequisites: Fix regression in gp_resolved_file_type
Fortran: Fix .mod file comparison for Intel 16 format
VS: Fix VS 2015 .vcxproj debug setting for v80 toolset
FindHDF5: Fix regression in providing HDF5_IS_PARALLEL
FindHDF5: Fix regression in finding hdf5hl_fortran
curl: Backport certificate reuse fix from 7.50.2
CMake 3.6.2
Chuck Atkins (2):
FindHDF5: Make sure compile definition vars keep the -D flag
CrayLinuxEnvironment: Add alternative methods to get version info
Curl Upstream (2):
curl 2015-08-11 (1a7f66a3)
curl 2016-08-03 (f2cb3a01)
Fujii Hironori (1):
VS: Fix out-of-bounds write on empty Nsight Tegra version
Konstantin Sinitsyn (1):
FindProtobuf: Restore support for PROTOBUF_IMPORT_DIRS
The SIZEOF_VOID_P macro is defined by code in CMakeLists.txt using
the value of CMAKE_SIZEOF_VOID_P. The former is a C++ preprocessor
macro. The latter is only visible in CMake code.
CMake 3.6 Release Notes
***********************
Changes made since CMake 3.5 include the following.
New Features
============
Generators
----------
* The :generator:`Ninja` generator learned to produce phony targets
of the form ``sub/dir/all`` to drive the build of a subdirectory.
This is equivalent to ``cd sub/dir; make all`` with
:ref:`Makefile Generators`.
* The :generator:`Ninja` generator now includes system header files in build
dependencies to ensure correct re-builds when system packages are updated.
* The :generator:`Visual Studio 14 2015` generator learned to support the
Clang/C2 toolsets, e.g. with the ``-T v140_clang_3_7`` option.
This feature is experimental.
Commands
--------
* The :command:`add_custom_command` and :command:`add_custom_target` commands
learned how to use the :prop_tgt:`CROSSCOMPILING_EMULATOR` executable
target property.
* The :command:`install` command learned a new ``EXCLUDE_FROM_ALL`` option
to leave installation rules out of the default installation.
* The :command:`list` command gained a ``FILTER`` sub-command to filter
list elements by regular expression.
* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)`
commands gained support for the ``%s`` placeholder. This is
the number of seconds since the UNIX Epoch.
Variables
---------
* A :variable:`CMAKE_DEPENDS_IN_PROJECT_ONLY` variable was introduced
to tell :ref:`Makefile Generators` to limit dependency scanning only
to files in the project source and build trees.
* A new :variable:`CMAKE_HOST_SOLARIS` variable was introduced to
indicate when CMake is running on an Oracle Solaris host.
* A :variable:`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable was
added for use by toolchain files to specify system include directories
to be appended to all compiler command lines.
* The :variable:`CMAKE_<LANG>_STANDARD_LIBRARIES` variable is now documented.
It is intended for use by toolchain files to specify system libraries to be
added to all linker command lines.
* A :variable:`CMAKE_NINJA_OUTPUT_PATH_PREFIX` variable was introduced
to tell the :generator:`Ninja` generator to configure the generated
``build.ninja`` file for use as a ``subninja``.
* A :variable:`CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable was
added for use by toolchain files to specify platform-specific
variables that must be propagated by the :command:`try_compile`
command into test projects.
* A :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable was added
to optionally tell the :command:`try_compile` command to build
a static library instead of an executable. This is useful for
cross-compiling toolchains that cannot link binaries without
custom flags or scripts.
Properties
----------
* A :prop_tgt:`DEPLOYMENT_REMOTE_DIRECTORY` target property was introduced
to tell the :generator:`Visual Studio 9 2008` and
:generator:`Visual Studio 8 2005` generators to generate the "remote
directory" for WinCE project deployment and debugger settings.
* A :prop_tgt:`<LANG>_CLANG_TIDY` target property and supporting
:variable:`CMAKE_<LANG>_CLANG_TIDY` variable were introduced to tell the
:ref:`Makefile Generators` and the :generator:`Ninja` generator to run
``clang-tidy`` along with the compiler for ``C`` and ``CXX`` languages.
* A :prop_test:`TIMEOUT_AFTER_MATCH` test property was introduced to
optionally tell CTest to enforce a secondary timeout after matching
certain output from a test.
* A :prop_tgt:`VS_CONFIGURATION_TYPE` target property was introduced
to specify a custom project file type for :ref:`Visual Studio Generators`
supporting VS 2010 and above.
* A :prop_dir:`VS_STARTUP_PROJECT` directory property was introduced
to specify for :ref:`Visual Studio Generators` the default startup
project for generated solutions (``.sln`` files).
Modules
-------
* The :module:`CMakePushCheckState` module now pushes/pops/resets the variable
``CMAKE_EXTRA_INCLUDE_FILE`` used in :module:`CheckTypeSize`.
* The :module:`ExternalProject` module leared the ``GIT_SHALLOW 1``
option to perform a shallow clone of a Git repository.
* The :module:`ExternalProject` module learned to initialize Git submodules
recursively and also to initialize new submodules on updates. Use the
``GIT_SUBMODULES`` option to restrict which submodules are initalized and
updated.
* The :module:`ExternalProject` module leared the ``DOWNLOAD_NO_EXTRACT 1``
argument to skip extracting the file that is downloaded (e.g., for
self-extracting shell installers or ``.msi`` files).
* The :module:`ExternalProject` module now uses ``TLS_VERIFY`` when fetching
from git repositories.
* The :module:`FindBLAS` and :module:`FindLAPACK` modules learned to
support `OpenBLAS <http://www.openblas.net>`__.
* The :module:`FindCUDA` module learned to find the ``cublas_device`` library.
* The :module:`FindGTest` module ``gtest_add_tests`` function now causes
CMake to automatically re-run when test sources change so that they
can be re-scanned.
* The :module:`FindLTTngUST` module was introduced to find the LTTng-UST
library.
* The :module:`FindPkgConfig` module learned to optionally create imported
targets for the libraries it has found.
* The :module:`FindProtobuf` module learned to provide a ``Protobuf_VERSION``
variable and check the version number requested in a :command:`find_package`
call.
* The :module:`InstallRequiredSystemLibraries` module learned a new
``CMAKE_INSTALL_UCRT_LIBRARIES`` option to enable app-local deployment
of the Windows Universal CRT libraries with Visual Studio 2015.
Platforms
---------
* The Clang compiler is now supported on CYGWIN.
* Support was added for the Bruce C Compiler with compiler id ``Bruce``.
CTest
-----
* The :command:`ctest_update` command now looks at the
:variable:`CTEST_GIT_INIT_SUBMODULES` variable to determine whether
submodules should be updated or not before updating.
* The :command:`ctest_update` command will now synchronize submodules on an
update. Updates which add submodules or change a submodule's URL will now be
pulled properly.
CPack
-----
* The :module:`CPackDeb` module learned how to handle ``$ORIGIN``
in ``CMAKE_INSTALL_RPATH`` when :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
is used for dependency auto detection.
* The :module:`CPackDeb` module learned how to generate ``DEBIAN/shlibs``
contorl file when package contains shared libraries.
* The :module:`CPackDeb` module learned how to generate ``DEBIAN/postinst`` and
``DEBIAN/postrm`` files if the package installs libraries in
ldconfig-controlled locations (e.g. ``/lib/``, ``/usr/lib/``).
* The :module:`CPackDeb` module learned how to generate dependencies between
Debian packages if multi-component setup is used and
:variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables are set.
For backward compatibility this feature is disabled by default.
See :variable:`CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS`.
* The :module:`CPackDeb` module learned how to set custom package file names
including how to generate properly-named Debian packages::
<PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
For backward compatibility this feature is disabled by default. See
:variable:`CPACK_DEBIAN_FILE_NAME` and
:variable:`CPACK_DEBIAN_<COMPONENT>_FILE_NAME`.
* The :module:`CPackDeb` module learned how to set the package release number
(``DebianRevisionNumber`` in package file name when used in combination with
``DEB-DEFAULT`` value set by :variable:`CPACK_DEBIAN_FILE_NAME`). See
:variable:`CPACK_DEBIAN_PACKAGE_RELEASE`.
* The :module:`CPackDeb` module learned how to set the package architecture
per-component. See :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE`.
* The :module:`CPackDMG` module learned a new option to tell the CPack
``DragNDrop`` generaor to skip the ``/Applications`` symlink.
See the :variable:`CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK` variable.
* The :module:`CPackIFW` module gained a new
:command:`cpack_ifw_update_repository` command to update a QtIFW-specific
repository from a remote repository.
* The :module:`CPackRPM` module learned how to set RPM ``dist`` tag as part of
RPM ``Release:`` tag when enabled (mandatory on some Linux distributions for
e.g. on Fedora).
See :variable:`CPACK_RPM_PACKAGE_RELEASE_DIST`.
* The :module:`CPackRPM` module learned how to set default values for owning
user/group and file/directory permissions of package content.
See :variable:`CPACK_RPM_DEFAULT_USER`, :variable:`CPACK_RPM_DEFAULT_GROUP`,
:variable:`CPACK_RPM_DEFAULT_FILE_PERMISSIONS`,
:variable:`CPACK_RPM_DEFAULT_DIR_PERMISSIONS` and their per component
counterparts.
* The :module:`CPackRPM` module learned how to set user defined package file
names, how to specify that rpmbuild should decide on file name format as
well as handling of multiple rpm packages generated by a single user defined
spec file.
See :variable:`CPACK_RPM_PACKAGE_NAME` and
:variable:`CPACK_RPM_<component>_PACKAGE_NAME`.
* The :module:`CPackRPM` module learned how to correctly handle symlinks
that are pointing outside generated packages.
Other
-----
* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
is now aware of features supported by Intel C++ compilers versions 12.1
through 16.0 on UNIX platforms.
Deprecated and Removed Features
===============================
* The :module:`CMakeForceCompiler` module and its macros are now deprecated.
See module documentation for an explanation.
* The :command:`find_library`, :command:`find_path`, and :command:`find_file`
commands no longer search in installation prefixes derived from the ``PATH``
environment variable on non-Windows platforms. This behavior was added in
CMake 3.3 to support Windows hosts but has proven problematic on UNIX hosts.
Users that keep some ``<prefix>/bin`` directories in the ``PATH`` just for
their tools do not necessarily want any supporting ``<prefix>/lib``
directories searched. One may set the ``CMAKE_PREFIX_PATH`` environment
variable with a :ref:`;-list <CMake Language Lists>` of prefixes that are
to be searched.
* The :generator:`Visual Studio 7 .NET 2003` generator is now
deprecated and will be removed in a future version of CMake.
* The :generator:`Visual Studio 7` generator (for VS .NET 2002) has been
removed. It had been deprecated since CMake 3.3.
* The :generator:`Visual Studio 6` generator has been removed.
It had been deprecated since CMake 3.3.
Other Changes
=============
* The precompiled OS X binary provided on ``cmake.org`` now requires
OS X 10.7 or newer.
* On Linux and FreeBSD platforms, when building CMake itself from source and
not using a system-provided libcurl, OpenSSL is now used by default if it is
found on the system. This enables SSL/TLS support for commands supporting
network communication via ``https``, such as :command:`file(DOWNLOAD)`,
:command:`file(UPLOAD)`, and :command:`ctest_submit`.
* The :manual:`cmake(1)` ``--build`` command-line tool now rejects multiple
``--target`` options with an error instead of silently ignoring all but the
last one.
* :prop_tgt:`AUTOMOC` now diagnoses name collisions when multiple source
files in different directories use ``#include <moc_foo.cpp>`` with the
same name (because the generated ``moc_foo.cpp`` files would collide).
* The :module:`FindBISON` module ``BISON_TARGET`` macro now supports
special characters by passing the ``VERBATIM`` option to internal
:command:`add_custom_command` calls. This may break clients that
added escaping manually to work around the bug.
* The :module:`FindFLEX` module ``FLEX_TARGET`` macro now supports
special characters by passing the ``VERBATIM`` option to internal
:command:`add_custom_command` calls. This may break clients that
added escaping manually to work around the bug.
* The :module:`FindProtobuf` module input and output variables were all renamed
from ``PROTOBUF_`` to ``Protobuf_`` for consistency with other find modules.
Input variables of the old case will be honored if provided, and output
variables of the old case are always provided.
* The :module:`CPackRPM` module now supports upper cased component
names in per component CPackRPM specific variables.
E.g. component named ``foo`` now expects component specific
variable to be ``CPACK_RPM_FOO_PACKAGE_NAME`` while before
it expected ``CPACK_RPM_foo_PACKAGE_NAME``.
Upper cased component name part in variables is compatible
with convention used for other CPack variables.
For back compatibility old format of variables is still valid
and preferred if both versions of variable are set, but the
preferred future use is upper cased component names in variables.
New variables that will be added to CPackRPM in later versions
will only support upper cased component variable format.
* The CPack NSIS generator's configuration file template was fixed to
quote the path to the uninstaller tool used by the
:variable:`CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL` option.
This avoids depending on an insecure Windows feature to run an
uninstaller tool with a space in the path.
The cmake-gui(1) gained options to control warnings about deprecated functionality.
The cmake-gui(1) learned an option to set the toolset to be used with VS IDE and Xcode generators, much like the existing -T option to cmake(1).
The cmake-gui(1) gained a Regular Expression Explorer which may be used to create and evaluate regular expressions in real-time. The explorer window is available via the Tools menu.
The -Wdev and -Wno-dev cmake(1) options now also enable and suppress the deprecated warnings output by default.
The suppression of developer warnings as errors can now be controlled with the new -Werror=dev and -Wno-error=dev cmake(1) options.
The cmake(1) -E command-line tools copy, copy_if_different, copy_directory, and make_directory learned to support multiple input files or directories.
The cmake_parse_arguments() command is now implemented natively. The CMakeParseArguments module remains as an empty placeholder for compatibility.
The install(DIRECTORY) command learned to support generator expressions in the list of directories.
The CMAKE_ERROR_DEPRECATED variable can now be set using the -Werror=deprecated and -Wno-error=deprecated cmake(1) options.
The CMAKE_WARN_DEPRECATED variable can now be set using the -Wdeprecated and -Wno-deprecated cmake(1) options.
The VS_GLOBAL_<variable> target property is now implemented for VS 2010 and above. Previously it worked only in VS 2008 and below.
The ExternalProject module learned a new GIT_REMOTE_NAME option to control the git clone --origin value.
The FindBoost module now provides imported targets such as Boost::boost and Boost::filesystem.
The FindFLEX module FLEX_TARGET macro learned a new DEFINES_FILE option to specify a custom output header to be generated.
The FindGTest module now provides imported targets.
The FindGTK2 module, when GTK2_USE_IMPORTED_TARGETS is enabled, now sets GTK2_LIBRARIES to contain the list of imported targets instead of the paths to the libraries. Moreover it now sets a new GTK2_TARGETS variable containing all the targets imported.
The FindOpenMP module learned to support Clang.
The FindOpenSSL module gained a new OPENSSL_MSVC_STATIC_RT option to search for libraries using the MSVC static runtime.
The FindPNG module now provides imported targets.
The FindTIFF module now provides imported targets.
A FindXalanC module was introduced to find the Apache Xalan-C++ XSL transform processing library.
The FindXercesC module now provides imported targets.
CMakeDetermineCompilerId: Fix VS Itanium platform name
VS: Do not select a partial Windows 10 SDK folder
VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation
cmSystemTools: Add VersionCompareEqual helper
VS: Fix Windows 10 SDK version selection
FindJava: Fix typos in IdlJ and JarSigner component implementation
AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW
least like to play nanny and error out internally, but catch those
errors explicitly. Stops segfault when using NetBSD curses with invalid
TERM settings.
Fix auto export symbols for Dlls containing /bigobj for 64bit builds.
Cray: Implement Fortran compiler version detection
MSVC: Fix linking with /MANIFEST:NO option
Make C and C++ default dialect detection robust to advanced optimizations
FindGTest: Refactor test type checks to avoid cases triggering CMP0064
Android: Restore generation of non-versioned soname
Project: Guess default standard dialect if compiler was forced
Revert "Disable shared library support when compiler links statically"
Tests: Add case for add_subdirectory inside a function
Tests: Add case for unmatched cmake_policy({PUSH,POP})
Tests: Add case for package version file unmatched policy scope
cmState: Skip variable scope snapshots to avoid call stack duplicates
cmMakefile: Clarify purpose of method that pops a scope snapshot
cmMakefile: Remove unused PolicyPushPop interfaces
cmLocalGenerator: Use ScopePushPop RAII class to manage local variable scopes
cmState: Enforce policy scope balancing around variable scopes
cmLinkedTree: Rename 'Extend' method to 'Push'
cmLinkedTree: Add Pop method
cmListFileCache: Implement cmListFileBacktrace ctor/dtor out-of-line
cmState: Avoid accumulating policy stack storage for short-lived scopes
cmState: Avoid accumulating snapshot storage for short-lived scopes
cmOrderDirectories: Factor out directory comparison
cmOrderDirectories: Reduce repeat realpath() calls
Include `sys/types.h` header to get `mode_t`
Add NIOS2 CPU support
cmELF: Avoid divide by zero if there are no dynamic section entries
CMake 3.4 Release Notes
***********************
Changes made since CMake 3.3 include the following.
New Features
============
Generators
----------
* The :generator:`Visual Studio 14 2015` generator learned to select
a Windows 10 SDK based on the value of the :variable:`CMAKE_SYSTEM_VERSION`
variable and the SDKs available on the host.
* CMake learned rudimentary support for the Apple Swift language. When using
the :generator:`Xcode` generator with Xcode 6.1 or higher, one may enable
the ``Swift`` language with the :command:`enable_language` command or the
:command:`project` command (this is an error with other generators or when
Xcode is too old). Then one may list ``.swift`` source files in targets
for compilation.
Commands
--------
* The :command:`find_program` command learned a ``NAMES_PER_DIR``
option to consider all given ``NAMES`` in each directory before
moving on to the next directory.
* The :command:`get_filename_component` command learned a new ``BASE_DIR``
subcommand. This is used to specify a base directory when calculating an
absolute path from a relative path.
* The :command:`if` command learned a new ``TEST`` operator that evaluates
to true if a given test name has been defined by the :command:`add_test`
command. See policy :policy:`CMP0064`.
* The :command:`install(DIRECTORY)` command ``DESTINATION`` option learned to
support :manual:`generator expressions <cmake-generator-expressions(7)>`.
* The :command:`install(FILES)` command ``DESTINATION`` option learned to
support :manual:`generator expressions <cmake-generator-expressions(7)>`.
* The :command:`string` command learned a new ``APPEND`` subcommand.
Variables
---------
* The :ref:`Makefile Generators` and the :generator:`Ninja` generator
learned to add compiler launcher tools like distcc and ccache along
with the compiler for ``C`` and ``CXX`` languages. See the
:variable:`CMAKE_<LANG>_COMPILER_LAUNCHER` variable and
:prop_tgt:`<LANG>_COMPILER_LAUNCHER` target property for details.
* New :variable:`CMAKE_LINK_SEARCH_START_STATIC` and
:variable:`CMAKE_LINK_SEARCH_END_STATIC` variables were
introduced to initialize the
:prop_tgt:`LINK_SEARCH_START_STATIC` and
:prop_tgt:`LINK_SEARCH_END_STATIC` target properties,
respectively.
Properties
----------
* :ref:`Visual Studio Generators` learned to support additonal
target properties to customize projects for NVIDIA Nsight
Tegra Visual Studio Edition:
* :prop_tgt:`ANDROID_ANT_ADDITIONAL_OPTIONS`
* :prop_tgt:`ANDROID_ARCH`
* :prop_tgt:`ANDROID_ASSETS_DIRECTORIES`
* :prop_tgt:`ANDROID_JAR_DEPENDENCIES`
* :prop_tgt:`ANDROID_JAR_DIRECTORIES`
* :prop_tgt:`ANDROID_JAVA_SOURCE_DIR`
* :prop_tgt:`ANDROID_NATIVE_LIB_DEPENDENCIES`
* :prop_tgt:`ANDROID_NATIVE_LIB_DIRECTORIES`
* :prop_tgt:`ANDROID_PROCESS_MAX`
* :prop_tgt:`ANDROID_PROGUARD`
* :prop_tgt:`ANDROID_PROGUARD_CONFIG_PATH`
* :prop_tgt:`ANDROID_SECURE_PROPS_PATH`
* :prop_tgt:`ANDROID_SKIP_ANT_STEP`
* :prop_tgt:`ANDROID_STL_TYPE`
* The :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`,
:prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and
:prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` target properties learned to
support :manual:`generator expressions <cmake-generator-expressions(7)>`.
* The :prop_tgt:`SOURCE_DIR` and :prop_tgt:`BINARY_DIR` target properties
were introduced to allow project code to query where a target is defined.
* The :prop_tgt:`OUTPUT_NAME` target property and its variants learned to
support :manual:`generator expressions <cmake-generator-expressions(7)>`.
* A :prop_gbl:`TARGET_MESSAGES` global property was added to tell the
:ref:`Makefile Generators` whether to generate commands to print output
after each target is completed.
* On Windows with MS-compatible tools, CMake learned to optionally
generate a module definition (``.def``) file for ``SHARED`` libraries.
See the :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property.
Modules
-------
* The :module:`ExternalProject` module :command:`ExternalProject_Add`
function ``GIT_SUBMODULES`` option now also limits the set of
submodules that are initialized in addition to the prior behavior
of limiting the set of submodules that are updated.
* The :module:`ExternalProject` module learned new ``USES_TERMINAL``
arguments for giving steps exclusive terminal access. This is
useful with the :generator:`Ninja` generator to monitor CMake
superbuild progress and prevent CPU oversubscription.
* The :module:`FindBISON` module ``BISON_TARGET`` macro learned a
new ``DEFINES_FILE`` option to specify a custom output header
to be generated.
* The :module:`FindHDF5` module learend a new ``HDF5_PREFER_PARALLEL``
option allowing users to specify that a parallel HDF5 tool is
preferred if both are available.
* The :module:`FindIce` module now provides imported targets.
* The :module:`FindJava` module learned to optionally find
the ``idlj`` and ``jarsigner`` tools.
* The :module:`FindOpenSSL` module now provides imported targets.
* The :module:`FindOpenSSL` module learned a new ``OPENSSL_USE_STATIC_LIBS``
option to search only for static libraries.
* The :module:`FindPkgConfig` learned a new :command:`pkg_get_variable`
command which may be used to query for arbitrary variables from a package
(such as for related tools or data and plugin install paths).
* The :module:`FindProtobuf` module gained a new
:command:`protobuf_generate_python` function to generate python
sources from ``.proto`` files.
* The :module:`FindTIFF` module learned to search separately for
debug and release variants.
* The :module:`FindwxWidgets` module learned to support version requests.
* The :module:`FindXercesC` module learned to search separately for
debug and release variants.
* The :module:`FindZLIB` module learned to search separately for
debug and release variants.
* The :module:`GNUInstallDirs` module learned special default values
for certain installation prefixes according to the `GNU Coding
Standards`_ and the `Filesystem Hierarchy Standard`_.
* The :module:`UseJava` module ``add_jar`` function learned
to support response files (e.g. ``@srcs.txt``) for source
specification.
* The :module:`UseJava` module ``install_jar`` function learned
new ``DESTINATION`` and ``COMPONENT`` options to specify
the corresponding :command:`install` command options.
* The :module:`UseJava` module gained a new ``create_javah``
function to create C headers from Java classes.
.. _`GNU Coding Standards`: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
.. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
Generator Expressions
---------------------
* A new ``$<SHELL_PATH:...>``
:manual:`generator expression <cmake-generator-expressions(7)>`
has been added.
CTest
-----
* CTest learned to optionally measure the CPU load during parallel
testing and avoid starting tests that may cause the load to exceed
a given threshold. See the :manual:`ctest(1)` command ``--test-load``
option, the ``TestLoad`` setting of the :ref:`CTest Test Step`,
the :variable:`CTEST_TEST_LOAD` variable, and the ``TEST_LOAD``
option of the :command:`ctest_test` command.
* :manual:`ctest(1)` learned options
``--test-output-size-passed`` and ``--test-output-size-failed``
to customize the limit on test output size submitted when
running as a :ref:`Dashboard Client`.
CPack
-----
* The :module:`CPackDeb` module learned to set package dependencies
per component. See variables:
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS`
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS`
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES`
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS`
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES`
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS`
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES`
* :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS`
* The :module:`CPack` module learned to package empty directories.
* The :module:`CPack` module gained a new setting, ``CPACK_VERBATIM_VARIABLES``,
which can be used to ensure the cpack program receives the settings' values
exactly as they were set, even if they contain CMake-special characters.
For compatibility, it's off by default.
Other
-----
* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
is now aware of features supported by GNU C compilers on Windows.
* CMake learned to honor ``*.manifest`` source files with MSVC tools.
Manifest files named as sources of ``.exe`` and ``.dll`` targets
will be merged with linker-generated manifests and embedded in the
binary.
* The `Concurrent Fortran 77 <https://ccur.com>`__ compiler is now supported.
Its :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` is ``CCur``.
* :manual:`cmake(1)` gained a new ``--trace-expand`` command line option
that is like ``--trace`` but expands variable references in the output.
Deprecated and Removed Features
===============================
* The :module:`CMakeExpandImportedTargets` module is now documented
as deprecated. See module documentation for an explanation.
* The :variable:`CMAKE_USE_RELATIVE_PATHS` variable no longer has any
effect. Previously it was partially implemented and unreliable.
Other Changes
=============
* The :module:`CheckFunctionExists`, :module:`CheckLibraryExists`,
:module:`CheckSymbolExists`, and :module:`FindThreads` modules learned to
work in environments where only CXX is enabled.
* The :module:`CPackDeb` module now correctly excludes symlinks during package
checksum calculation.
* The :module:`CPackDeb` no longer uses fakeroot and system tar program for
packaging.
* The :module:`CPack` module no longer mangles settings with CMake-special
characters when they're used as defaults for other settings. The macro
``cpack_set_if_not_set``, which was responsible for this, is now deprecated.
* CMake no longer links executables with flags to export symbols
unless the :prop_tgt:`ENABLE_EXPORTS` target property is set.
See policy :policy:`CMP0065`.
* The ``SONAME`` field is no longer set for ``MODULE`` libraries
created with the :command:`add_library` command. ``MODULE``
libraries are meant for explicit dynamic loading at runtime.
They cannot be linked so ``SONAME`` is not useful.
* The internal :variable:`CMAKE_<LANG>_COMPILE_OBJECT` rule variable now
substitutes compiler include flags in a separate ``<INCLUDES>`` placeholder
instead of the main ``<FLAGS>`` placeholder.