Changes made since CMake 3.3 include the following.
CMake learned rudimentary support for the Apple Swift language. When using the
Xcodegenerator with Xcode 6.1 or higher, one may enable the
Swiftlanguage 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
.swiftsource files in targets for compilation.
find_program()command learned a
NAMES_PER_DIRoption to consider all given
NAMESin each directory before moving on to the next directory.
get_filename_component()command learned a new
BASE_DIRsubcommand. This is used to specify a base directory when calculating an absolute path from a relative path.
string()command learned a new
The Makefile Generators and the
Ninjagenerator learned to add compiler launcher tools like distcc and ccache along with the compiler for
CXXlanguages. See the
<LANG>_COMPILER_LAUNCHERtarget property for details.
Visual Studio Generators learned to support additional target properties to customize projects for NVIDIA Nsight Tegra Visual Studio Edition:
On Windows with MS-compatible tools, CMake learned to optionally generate a module definition (
.def) file for
SHAREDlibraries. See the
GIT_SUBMODULESoption 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.
ExternalProjectmodule learned new
USES_TERMINALarguments for giving steps exclusive terminal access. This is useful with the
Ninjagenerator to monitor CMake superbuild progress and prevent CPU oversubscription.
BISON_TARGETmacro learned a new
DEFINES_FILEoption to specify a custom output header to be generated.
FindHDF5module learend a new
HDF5_PREFER_PARALLELoption allowing users to specify that a parallel HDF5 tool is preferred if both are available.
FindIcemodule now provides imported targets.
FindJavamodule learned to optionally find the
FindOpenSSLmodule now provides imported targets.
FindOpenSSLmodule learned a new
OPENSSL_USE_STATIC_LIBSoption to search only for static libraries.
FindTIFFmodule learned to search separately for debug and release variants.
FindwxWidgetsmodule learned to support version requests.
FindXercesCmodule learned to search separately for debug and release variants.
FindZLIBmodule learned to search separately for debug and release variants.
add_jarfunction learned to support response files (e.g.
@srcs.txt) for source specification.
UseJavamodule gained a new
create_javahfunction to create C headers from Java classes.
generator expressionhas been added.
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
TestLoadsetting of the CTest Test Step, the
CTEST_TEST_LOADvariable, and the
TEST_LOADoption of the
CPack DEB Generatorlearned to set package dependencies per component. See variables:
CPackmodule learned to package empty directories.
CPackmodule 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.
Compile Featuresfunctionality is now aware of features supported by GNU C compilers on Windows.
CMake learned to honor
*.manifestsource files with MSVC tools. Manifest files named as sources of
.dlltargets will be merged with linker-generated manifests and embedded in the binary.
The Concurrent Fortran 77 compiler is now supported. Its
cmake(1)gained a new
--trace-expandcommand line option that is like
--tracebut expands variable references in the output.
CPack DEB Generatornow correctly excludes symlinks during package checksum calculation.
CPack DEB Generatorno longer uses fakeroot and system tar program for packaging.
CPackmodule 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.
SONAMEfield is no longer set for
MODULElibraries created with the
MODULElibraries are meant for explicit dynamic loading at runtime. They cannot be linked so
SONAMEis not useful.
CMAKE_<LANG>_COMPILE_OBJECTrule variable now substitutes compiler include flags in a separate
<INCLUDES>placeholder instead of the main