CMake 3.4 Release Notes

Changes made since CMake 3.3 include the following.

New Features

Generators

  • The Visual Studio 14 2015 generator learned to select a Windows 10 SDK based on the value of the CMAKE_SYSTEM_VERSION variable and the SDKs available on the host.

  • CMake learned rudimentary support for the Apple Swift language. When using the Xcode generator with Xcode 6.1 or higher, one may enable the Swift language with the enable_language() command or the 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

Variables

Properties

Modules

  • The ExternalProject module 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 ExternalProject module learned new USES_TERMINAL arguments for giving steps exclusive terminal access. This is useful with the Ninja generator to monitor CMake superbuild progress and prevent CPU oversubscription.

  • The FindBISON module BISON_TARGET macro learned a new DEFINES_FILE option to specify a custom output header to be generated.

  • The 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 FindIce module now provides imported targets.

  • The FindJava module learned to optionally find the idlj and jarsigner tools.

  • The FindOpenSSL module now provides imported targets.

  • The FindOpenSSL module learned a new OPENSSL_USE_STATIC_LIBS option to search only for static libraries.

  • The FindPkgConfig learned a new 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 FindProtobuf module gained a new protobuf_generate_python() function to generate python sources from .proto files.

  • The FindTIFF module learned to search separately for debug and release variants.

  • The FindwxWidgets module learned to support version requests.

  • The FindXercesC module learned to search separately for debug and release variants.

  • The FindZLIB module learned to search separately for debug and release variants.

  • The GNUInstallDirs module learned special default values for certain installation prefixes according to the GNU Coding Standards and the Filesystem Hierarchy Standard.

  • The UseJava module add_jar function learned to support response files (e.g. @srcs.txt) for source specification.

  • The UseJava module install_jar function learned new DESTINATION and COMPONENT options to specify the corresponding install() command options.

  • The UseJava module gained a new create_javah function to create C headers from Java classes.

Generator Expressions

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 ctest(1) command --test-load option, the TestLoad setting of the CTest Test Step, the CTEST_TEST_LOAD variable, and the TEST_LOAD option of the ctest_test() command.

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

CPack

Other

  • The Compile Features 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 compiler is now supported. Its compiler id is CCur.

  • 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

Other Changes

  • The CheckFunctionExists, CheckLibraryExists, CheckSymbolExists, and FindThreads modules learned to work in environments where only CXX is enabled.

  • The CPack DEB Generator now correctly excludes symlinks during package checksum calculation.

  • The CPack DEB Generator no longer uses fakeroot and system tar program for packaging.

  • The 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 ENABLE_EXPORTS target property is set. See policy CMP0065.

  • The SONAME field is no longer set for MODULE libraries created with the add_library() command. MODULE libraries are meant for explicit dynamic loading at runtime. They cannot be linked so SONAME is not useful.

  • The internal CMAKE_<LANG>_COMPILE_OBJECT rule variable now substitutes compiler include flags in a separate <INCLUDES> placeholder instead of the main <FLAGS> placeholder.