CMake 3.10.0-rc2 is ready for testing
I am proud to announce the second CMake 3.10 release candidate.
Documentation is available at:
Release notes appear below and are also published at
Some of the more significant changes in CMake 3.10 are:
- The flang Fortran compiler is now supported, with compiler id
- 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
- 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
- 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
CMake 3.10 Release Notes ************************ Changes made since CMake 3.9 include the following. New Features ============ Platforms --------- * The flang Fortran compiler is now supported, with compiler id "Flang". * A new minimal platform file for "Midipix" was added. * Support for the MSVC ARM64 architecture was added. Visual Studio 2017 Update 4 and above offer an ARM64 toolchain. * Support for the IAR ARM Compiler was improved. Generators ---------- * The Makefile Generators and the "Ninja" generator learned to add compiler launcher tools like ccache along with the compiler for the "CUDA" language ("C" and "CXX" were supported previously). See the "CMAKE__COMPILER_LAUNCHER" variable and "_COMPILER_LAUNCHER" target property for details. * The "CodeBlocks" extra generator learned to optionally exclude files from outside the project root directory from the generated project. See the "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES" variable. Commands -------- * The "cmake_host_system_information()" command learned more keys to get information about the processor capabilities and the host OS version. * The "configure_file()" command learned to support indented "# cmakedefine" and "# cmakedefine01". Spaces and/or tabs between the "#" character and the "cmakedefine"/"cmakedefine01" words are now understood and preserved in the output. * The "execute_process()" command gained a "RESULTS_VARIABLE" option to collect a list of results from all children in a pipeline of processes when multiple "COMMAND" arguments are given. * 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. * The "string()" command learned a new "PREPEND" subcommand. * The "string(TIMESTAMP)" command now supports "%A" for full weekday name and "%B" for full month name. Variables --------- * A "CMAKE_DIRECTORY_LABELS" variable was added to specify labels for all tests in a directory. Properties ---------- * A "_CPPCHECK" target property and supporting "CMAKE__CPPCHECK" variable were introduced to tell the Makefile Generators and the "Ninja" generator to run "cppcheck" with the compiler for "C" and "CXX" languages. * A "LABELS" directory property was added to specify labels for all targets and tests in a directory. * A "TEST_INCLUDE_FILES" directory property was added to list any number of files to be included when running tests with "ctest(1)". This generalizes the "TEST_INCLUDE_FILE" property. * The "VS_DOTNET_REFERENCEPROP__TAG_" target property was added to support custom XML tags for reference assemblies in C# targets. * Source file properties "VS_SHADER_OUTPUT_HEADER_FILE" and "VS_SHADER_VARIABLE_NAME" have been added to specify more details of ".hlsl" sources with Visual Studio Generators. Modules ------- * The "FindCurses" module gained a "CURSES_NEED_WIDE" option to request the wide-character variant. * The "FindEXPAT" module now provides imported targets. * The "FindFreetype" module now provides imported targets. * "FindMPI" gained a number of new features, including: * Language-specific components have been added to the module. * Many more MPI environments are now supported. * The environmental support for Fortran has been improved. * A user now has fine-grained control over the MPI selection process, including passing custom parameters to the MPI compiler. * The version of the implemented MPI standard is now being exposed. * MPI-2 C++ bindings can now be detected and also suppressed if so desired. * The available Fortran bindings are now being detected and verified. * Various MPI-3 information can be requested, including the library version and Fortran capabilities of the individual bindings. * Statically linked MPI implementations are supported. * A "FindOpenACC" module was added to detect compiler support for OpenACC. Currently only supports PGI, GNU and Cray compilers. * The "FindOpenGL" module gained support for GLVND on Linux. * The "FindOpenMP" module gained support for language-specific components. * A "FindPatch" module was added to find the "patch" command-line executable. * The "FindProtobuf" module "protobuf_generate_cpp()" command gained a "DESCRIPTORS" option to generate descriptor files. * The "GoogleTest" module gained a new command "gtest_discover_tests()" implementing dynamic (build-time) test discovery. Unlike the source parsing approach, dynamic discovery executes the test (in 'list available tests' mode) at build time to discover tests. This is robust against unusual ways of labeling tests, provides much better support for advanced features such as parameterized tests, and does not require re-running CMake to discover added or removed tests within a test executable. * The "InstallRequiredSystemLibraries" module gained support for installing Intel compiler runtimes. Autogen ------- * When using "AUTOMOC" or "AUTOUIC" with a multi configuration generator (e.g. "Xcode"), included "*.moc", "moc_*.cpp" and "ui_*.h" files are generated in "/include_" instead of "/include". * 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". * When using "AUTOMOC", CMake searches for the strings "Q_OBJECT", "Q_GADGET" or "Q_NAMESPACE" in a source file to determine if it needs to be "moc" processed. The new "CMAKE_AUTOMOC_MACRO_NAMES" variable and "AUTOMOC_MACRO_NAMES" target property may be set to register additional strings (macro names) to search for. * When using "AUTOMOC", the new "CMAKE_AUTOMOC_COMPILER_PREDEFINES" variable and "AUTOMOC_COMPILER_PREDEFINES" target property specify whether to enable or disable the generation of the compiler pre definitions file "moc_predefs.h". CTest ----- * 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 ----- * 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 "CPackDeb" module learned to set package release version in "Version" info property. See the "CPACK_DEBIAN_PACKAGE_RELEASE" variable. * The "CPackDeb" module learned more strict package version checking that complies with Debian rules. * The "CPackIFW" module "cpack_ifw_configure_component()" and "cpack_ifw_configure_component_group()" commands gained a new "REPLACES" and "CHECKABLE" options. * The "CPackIFW" module gained new "CPACK_IFW_PACKAGE_FILE_EXTENSION" variable to customize target binary format. * The "CPackIFW" module gained new "CPACK_IFW_REPOSITORIES_DIRECTORIES" variable to specify additional repositories dirs that will be used to resolve and repack dependent components. This feature is only available when using QtIFW 3.1 or later. * Modules "CPackRPM" and "CPackDeb" learned to set package epoch version. See "CPACK_RPM_PACKAGE_EPOCH" and "CPACK_DEBIAN_PACKAGE_EPOCH" variables. Other ----- * The "cmake(1)" "-E" mode gained support for "sha1sum", "sha224sum", "sha256sum", "sha384sum", and "sha512sum". * The graphviz output now distinguishes among the different dependency types "PUBLIC", "PRIVATE" and "INTERFACE" and represents them in the output graph as solid, dashed and dotted edges. Deprecated and Removed Features =============================== * Support for building CMake itself with C++98 compilers was dropped. CMake is now implemented using C++11. * Support for building CMake on HP-UX has been dropped pending better support for C++11 and a port of libuv. See CMake Issue 17137. Use CMake 3.9 or lower instead for HP-UX support. Other Changes ============= * On FreeBSD the C++ compiler named "c++" is now the preferred default. * 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". * The "get_filename_component()" "PROGRAM" mode semantics have been revised to not tolerate unquoted spaces in the path to the program while also accepting arguments. While technically incompatible with the old behavior, it is expected that behavior under typical use cases with properly-quoted command-lines has not changed. ---------------------------------------------------------------------------- Changes made since CMake 3.10.0-rc1: André Apitzsch (1): FindProtobuf: fix documentation typo Brad King (10): Help: Revise 3.10 release notes FindJava: Revise version parsing to support Java 9 curl: Update script to get curl 7.56.0 curl: Update build within CMake to account for 7.56 changes Help: Minor text clarifications in cmake-language(7) manual Clang: Diagnose unsupported GNU-like clang targeting MSVC ABI ExternalProject: Avoid if() auto-dereferene in quoted arguments FindXMLRPC: Drop unnecessary exec_program code paths FindXMLRPC: Tolerate no include directories CMake 3.10.0-rc2 Christian Pfeiffer (1): FindOpenMP: Fix link flags being used for compile Craig Scott (2): Help: Fix Example appearing in target property list of contents Help: Fix wrong property reference for an app bundle's Info.plist Curl Upstream (1): curl 2017-10-04 (3ea76790) Domen Vrankar (2): CPack/Deb: CPACK_DEBIAN_PACKAGE_VERSION regex testing exception CPack/Deb: fix for regex passing even if invalid characters are present Gregor Jasny (2): Revert "Xcode: Adjust tests to drop of 32bit iOS architectures" Xcode 9: Lower iOS deployment version to get armv7 builds Matthias Maennich (4): cmcmd: let operator<< for NumberFormatter reset the stream's format flags cmGeneratorTarget: remove dead code cmProcessTools: fix minor issue introduced by 595feb3 cmInstallCommandArguments: do not access static members through `this` Robert Maynard (1): FindCUDA: Update for CUDA 9 breakup of nppi into multiple libraries Sebastian Holtermann (3): Autogen: Allow setting SKIP_AUTOUIC/GEN on .ui files not in the sources Autogen: Docs: Add examples for AUTORCC_OPTIONS and AUTOUIC_OPTIONS Autogen: Docs: Extend SKIP_AUTOUIC documentation Thomas Stenersen (1): IPO: Fix support for spaces in path to archive tools