PK!a=i003.21.rstnu[CMake 3.21 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.20 include the following. New Features ============ Presets ------- * :manual:`cmake-presets(7)` gained support for specifying the install prefix in a configure preset. * :manual:`cmake-presets(7)` gained support for conditional enabling of presets. * :manual:`cmake-presets(7)` gained support for a ``${hostSystemName}`` macro. * :manual:`cmake-presets(7)` gained support for omitting the ``generator`` and ``binaryDir`` fields. Generators ---------- * The :generator:`Visual Studio 17 2022` generator was added. * The :ref:`Makefile Generators` and the :generator:`Ninja` generator learned to add linker launcher tools along with the linker for ``C``, ``CXX``, ``OBJC``, and ``OBJCXX`` languages. See the :variable:`CMAKE__LINKER_LAUNCHER` variable and :prop_tgt:`_LINKER_LAUNCHER` target property for details. Languages --------- * CMake learned to support ``HIP`` as a first-class language that can be enabled via the :command:`project` and :command:`enable_language` commands. * :prop_tgt:`C_STANDARD`, :prop_tgt:`OBJC_STANDARD`, and the :manual:`Compile Features ` functionality gained support for C17 and C23. * Source file extensions ``.ixx`` and ``.cppm`` are now treated as C++. Command-Line ------------ * :manual:`cmake(1)` gained the ``--install-prefix `` command-line option to specify the location of the install prefix. * :manual:`cmake(1)` gained the ``--toolchain `` command-line option to specify a toolchain file. * :manual:`cmake(1)` ``-E capabilities`` output, for some generators, may now contain a ``supportedPlatforms`` field listing platforms known to be supported in :variable:`CMAKE_GENERATOR_PLATFORM`. * Messages printed to a terminal now may be colored by message type. Compilers --------- * The Fujitsu compiler is now supported using compiler id ``Fujitsu`` in traditional (``Trad``) mode, and compiler id ``FujitsuClang`` in ``Clang`` mode. Platforms --------- * CMake now supports the MSYS runtime environment, much like CYGWIN. File-Based API -------------- * The :manual:`cmake-file-api(7)` "codemodel" version 2 ``version`` field has been updated to 2.3. * The :manual:`cmake-file-api(7)` "codemodel" version 2 gained a new "directory" object containing directory-level information. This includes a list of installers generated by the :command:`install` command. Commands -------- * The :command:`add_custom_command` command ``DEPFILE`` option: * may now use :manual:`generator expressions `, * is now supported by :ref:`Visual Studio Generators` for VS 2012 and above, and * is now supported by the :generator:`Xcode` generator. * The :command:`add_custom_command(TARGET)` command (for :ref:`Build Events `) gained support for resolving target-dependent generator expressions. * The :command:`build_command` command gained a ``PARALLEL_LEVEL`` option. * The :command:`file(COPY_FILE)` command was added to copy a single file. * The :command:`file(GET_RUNTIME_DEPENDENCIES)` command gained new ``POST_INCLUDE_FILES`` and ``POST_EXCLUDE_FILES`` arguments. * The :command:`file(REAL_PATH)` command gained the option ``EXPAND_TILDE`` to replace any leading tilde with the path to the user's home directory. * The :command:`file(RENAME)` command learned to optionally capture failure in a result variable. It also gained a ``NO_REPLACE`` option to fail if the destination exists. * The :command:`install` command gained a new ``IMPORTED_RUNTIME_ARTIFACTS`` mode, which can be used to install the runtime artifacts of imported targets. * The :command:`install` command gained a new ``RUNTIME_DEPENDENCY_SET`` mode, which can be used to install runtime dependencies using :command:`file(GET_RUNTIME_DEPENDENCIES)`. * The :command:`install(TARGETS)` command gained new ``RUNTIME_DEPENDENCIES`` and ``RUNTIME_DEPENDENCY_SET`` arguments, which can be used to install runtime dependencies using :command:`file(GET_RUNTIME_DEPENDENCIES)`. * The :command:`install(SCRIPT|CODE)` command supports a new option ``ALL_COMPONENTS`` which allows the corresponding code to run for every component of a per component installation. * The :command:`project` command now sets variables :variable:`PROJECT_IS_TOP_LEVEL` and :variable:`_IS_TOP_LEVEL` to indicate whether it was called in a top-level ``CMakeLists.txt`` file. Variables --------- * The :envvar:`CMAKE_TOOLCHAIN_FILE` environment variable was added to provide a default value for the :variable:`CMAKE_TOOLCHAIN_FILE` variable. Properties ---------- * The :prop_dir:`IMPORTED_TARGETS` directory property was added to get a list of :ref:`Imported Targets` created in the current directory. * The :prop_tgt:`XCODE_EMBED_APP_EXTENSIONS >` target property was added to tell the :generator:`Xcode` generator to embed app extensions such as iMessage sticker packs. Aspects of the embedding can be customized with the :prop_tgt:`XCODE_EMBED_APP_EXTENSIONS_PATH >`, :prop_tgt:`XCODE_EMBED_APP_EXTENSIONS_CODE_SIGN_ON_COPY _CODE_SIGN_ON_COPY>` and :prop_tgt:`XCODE_EMBED_APP_EXTENSIONS_REMOVE_HEADERS_ON_COPY _REMOVE_HEADERS_ON_COPY>` properties. Modules ------- * The :module:`FindBLAS` and :module:`FindLAPACK` modules learned to support the serial ``Fujitsu_SSL2`` and parallel ``Fujitsu_SSL2BLAMP`` libraries. * The :module:`FindDevIL` module now provides imported targets. * The :module:`FindIconv` module now has version support. * The :module:`FindIntl` module now has version support. * The :module:`FindMPI` module learned to support ``Fujitsu`` and ``FujitsuClang`` in both host and cross compiling modes. * The :module:`FindMsys` module was added to find MSYS installations. Like :module:`FindCygwin`, it is used automatically by some other find modules to locate UNIX-style tools on Windows. * The :module:`FindOpenMP` module learned to support ``Fujitsu`` and ``FujitsuClang``. * The :module:`FindVulkan` module gained imported targets ``Vulkan::Headers`` and ``Vulkan::glslangValidator``. * The :module:`UseJava` module command ``add_jar`` gained a ``RESOURCES`` option to allow explicit naming of resources with non-optional namespace. * The :module:`UseSWIG` module use now standard library naming conventions for the ``CSharp`` language. See policy :policy:`CMP0122`. * The :module:`UseSWIG` module now supports using the ``swig`` tool to generate implicit dependencies with the :generator:`Xcode` generator. Generator Expressions --------------------- * A new :genex:`TARGET_RUNTIME_DLLS` generator expression was added. CTest ----- * :manual:`ctest(1)` gained documentation for its ability to capture :ref:`Additional Test Measurements`. * :manual:`ctest(1)` learned to recognize files attached to a test at run time. Previously it was only possible to attach files to tests at configure time by using the :prop_test:`ATTACHED_FILES` or :prop_test:`ATTACHED_FILES_ON_FAIL` test properties. See :ref:`Additional Test Measurements` for more information. * :manual:`ctest(1)` gained a ``--output-junit`` option to write test results to a JUnit XML file. * The :command:`ctest_build` command gained a ``PARALLEL_LEVEL`` option. CPack ----- * The :cpack_gen:`CPack DragNDrop Generator` gained option :variable:`CPACK_DMG_FILESYSTEM` to control the ``.dmg`` filesystem. * The :cpack_gen:`CPack IFW Generator` now supports hyphens in names given to :command:`cpack_ifw_configure_component` or :command:`cpack_ifw_configure_component_group` as ``DEPENDS`` or ``DEPENDENCIES`` arguments. This requires QtIFW 3.1 or later. * The :cpack_gen:`CPack NSIS Generator` gained a new :variable:`CPACK_NSIS_EXECUTABLE` variable to specify the ``makensis`` executable to use instead of the default one. * The :variable:`CPACK_CUSTOM_INSTALL_VARIABLES` variable was added to set variables in ``cmake_install.cmake`` script invocations made by CPack. Deprecated and Removed Features =============================== * Undocumented :variable:`CMAKE_SYSTEM_NAME` version-stripping behavior has been removed entirely. If it is set by a ``-D`` flag or by a :manual:`toolchain file `, it is left unaltered, even if it still contains a version number. Similar :variable:`CMAKE_HOST_SYSTEM_NAME` version-stripping behavior, also undocumented, has been moved earlier, before :command:`project` or :command:`enable_language` is called. * ``ARMClang`` cpu/arch compile and link flags are no longer added automatically based on the :variable:`CMAKE_SYSTEM_PROCESSOR` variable or the undocumented ``CMAKE_SYSTEM_ARCH`` variable. They must be specified explicitly. See policy :policy:`CMP0123`. Other Changes ============= * The :command:`find_file`, :command:`find_path`, :command:`find_program`, and :command:`find_library` commands handle cache variables in the same way regardless how they are defined. See policy :policy:`CMP0125` for details. * The :command:`find_file`, :command:`find_path`, :command:`find_program`, and :command:`find_library` commands gained the option ``NO_CACHE`` to store find result in normal variable. * The :command:`foreach` command now isolates loop variables in the loop scope. See policy :policy:`CMP0124` for details. * The :command:`list` command's ``GET``, ``INSERT``, ``SUBLIST``, and ``REMOVE_AT`` subcommands now error with invalid (i.e., non-integer) values are given as any of their index arguments based on the setting of policy :policy:`CMP0121`. * The :command:`set(CACHE)` command no longer removes a normal variable of the same name, if any. See policy :policy:`CMP0126`. * :command:`target_link_libraries` calls referencing object libraries via the :genex:`TARGET_OBJECTS` generator expression now place the object files before all libraries on the link line, regardless of their specified order. See documentation on :ref:`Linking Object Libraries via \$\` for details. * The :ref:`Ninja Generators` now pass source files and include directories to the compiler using absolute paths. This makes diagnostic messages and debug symbols more consistent, and matches the :ref:`Makefile Generators`. * The :generator:`NMake Makefiles` generator now encodes the generated makefiles as UTF-8 with a BOM when using ``nmake`` from VS 9 or above. * The :ref:`Visual Studio Generators` for VS 2010 and above now place per-source preprocessor definitions after target-wide preprocssor definitions. This makes VS consistent with the :ref:`Ninja Generators` and the :ref:`Makefile Generators`. * The precompiled binaries provided on `cmake.org `_ now support ``liblzma`` multi-threading. See the :variable:`CPACK_THREADS` and :variable:`CPACK_ARCHIVE_THREADS` variables. Updates ======= Changes made since CMake 3.21.0 include the following. 3.21.1 ------ * The :generator:`Visual Studio 17 2022` generator is now based on "Visual Studio 2022 Preview 2". Previously it was based on "Preview 1.1". 3.21.2 ------ * ``CUDA`` targets with :prop_tgt:`CUDA_SEPARABLE_COMPILATION` enabled are now correctly generated in non-root directories. * The :generator:`Visual Studio 17 2022` generator is now based on "Visual Studio 2022 Preview 3.1". Previously it was based on "Preview 2". 3.21.3 ------ * The :generator:`Visual Studio 17 2022` generator is now based on "Visual Studio 2022 Preview 4". Previously it was based on "Preview 3.1". * The AMD ROCm Platform ``hipcc`` compiler was identifed by CMake 3.21.0 through 3.21.2 as a distinct compiler with id ``ROCMClang``. This has been removed because it caused regressions. Instead: * ``hipcc`` may no longer be used as a ``HIP`` compiler because it interferes with flags CMake needs to pass to Clang. Use Clang directly. * ``hipcc`` may once again be used as a ``CXX`` compiler, and is treated as whatever compiler it selects underneath, as CMake 3.20 and below did. 3.21.4 ------ * The :generator:`Visual Studio 17 2022` generator is now based on the "Visual Studio 2022" release candidates. Previously it was based on preview versions. PK!0 F F3.8.rstnu[CMake 3.8 Release Notes *********************** .. only:: html .. contents:: Changes made since CMake 3.7 include the following. New Features ============ Languages --------- C# ^^ * CMake learned to support ``CSharp`` (C#) as a first-class language that can be enabled via the :command:`project` and :command:`enable_language` commands. It is currently supported by the :ref:`Visual Studio Generators` for VS 2010 and above. C# assemblies and programs can be added just like common C++ targets using the :command:`add_library` and :command:`add_executable` commands. References between C# targets in the same source tree may be specified by :command:`target_link_libraries` like for C++. References to system or 3rd-party assemblies may be specified by the target properties :prop_tgt:`VS_DOTNET_REFERENCE_` and :prop_tgt:`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, ...). CUDA ^^^^ * CMake learned to support ``CUDA`` as a first-class language that can be enabled via the :command:`project` and :command:`enable_language` commands. * ``CUDA`` is currently supported by the :ref:`Makefile Generators` and the :generator:`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. C & C++ ^^^^^^^ * The :manual:`Compile Features ` functionality now offers meta-features that request compiler modes for specific language standard levels (e.g. ``cxx_std_11``). See :prop_gbl:`CMAKE_C_KNOWN_FEATURES` and :prop_gbl:`CMAKE_CXX_KNOWN_FEATURES`. * The :manual:`Compile Features ` functionality is now aware of C++ 17. No specific features are yet enumerated besides the ``cxx_std_17`` meta-feature. * The :manual:`Compile Features ` functionality is now aware of the availability of C99 in gcc since version 3.4. Platforms --------- * A new minimal platform file for ``Fuchsia`` was added. Generators ---------- * The :generator:`CodeBlocks` extra generator may now be used to generate with :generator:`NMake Makefiles JOM`. * The :ref:`Visual Studio Generators` for VS 2013 and above learned to support a ``host=x64`` option in the :variable:`CMAKE_GENERATOR_TOOLSET` value (e.g. via the :manual:`cmake(1)` ``-T`` option) to request use of a VS 64-bit toolchain on 64-bit hosts. * The :ref:`Visual Studio Generators` learned to treat files passed to :command:`target_link_libraries` whose names end in ``.targets`` as MSBuild "targets" files to be imported into generated project files. Commands -------- * The :command:`add_custom_command` and :command:`add_custom_target` commands learned the option ``COMMAND_EXPAND_LISTS`` which causes lists in the ``COMMAND`` argument to be expanded, including lists created by generator expressions. * The :command:`execute_process` command gained an ``ENCODING`` option to specify on Windows which encoding is used for output from child process. * The :command:`math(EXPR)` command gained support for unary ``+`` and ``-`` operators. * The :command:`source_group` command gained ``TREE`` and ``PREFIX`` options to add groups following source tree directory structure. * The :command:`string(TIMESTAMP)` command learned to treat ``%%`` as a way to encode plain ``%``. * The :command:`string(TIMESTAMP)` command will now honor the ``SOURCE_DATE_EPOCH`` environment variable and use its value instead of the current time. * The :command:`try_compile` command source file signature gained new options to specify the language standard to use in the generated test project. * The :command:`try_compile` command source file signature now honors language standard variables like :variable:`CMAKE_CXX_STANDARD`. See policy :policy:`CMP0067`. Variables --------- * A :variable:`CMAKE_CODELITE_USE_TARGETS` variable was added to tell the :generator:`CodeLite` extra generator to change the generated project to have target-centric organization. The ``build``, ``rebuild``, and ``clean`` operations within ``CodeLite`` then work on a selected target rather than the whole workspace. (Note that the :generator:`Ninja` clean operation on a target includes its dependencies, though.) * The :variable:`CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable was added to tell the :generator:`Sublime Text 2` extra generator to place specified environment variables in the generated ``.sublime-project``. * The :variable:`CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE` variable was added to tell the :generator:`Sublime Text 2` extra generator whether to exclude the build tree from the ``.sublime-project`` when it is inside the source tree. * A :variable:`CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD` variable was added to tell :ref:`Visual Studio Generators` for VS 2010 and above to include the ``PACKAGE`` target in the default build, similar to the existing :variable:`CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD` variable for the ``INSTALL`` target. Properties ---------- * A :prop_tgt:`BUILD_RPATH` target property and corresponding :variable:`CMAKE_BUILD_RPATH` variable were added to support custom ``RPATH`` locations to be added to binaries in the build tree. * The :prop_sf:`COMPILE_FLAGS` source file property learned to support :manual:`generator expressions `. * The :prop_tgt:`FRAMEWORK` target property may now also be applied to static libraries on Apple targets. It will result in a proper Framework but with a static library inside. * :ref:`Imported ` :ref:`Interface Libraries` learned new :prop_tgt:`IMPORTED_LIBNAME` and :prop_tgt:`IMPORTED_LIBNAME_` target properties to specify a link library name since interface libraries do not build their own library files. * A :prop_tgt:`_CPPLINT` target property and supporting :variable:`CMAKE__CPPLINT` variable were introduced to tell the :ref:`Makefile Generators` and the :generator:`Ninja` generator to run the ``cpplint`` style checker along with the compiler for ``C`` and ``CXX`` languages. * A :prop_tgt:`MANUALLY_ADDED_DEPENDENCIES` target property has been added. It provides a read-only list of dependencies that have been added with the :command:`add_dependencies` command. * The :prop_tgt:`MAP_IMPORTED_CONFIG_` target property learned to interpret empty list elements as referring to the configuration-less imported location specified by :prop_tgt:`IMPORTED_LOCATION`. * The :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target property is now supported on :ref:`Imported ` :ref:`Interface Libraries`. * New source file properties :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC`, :prop_sf:`SKIP_AUTORCC`, and :prop_sf:`SKIP_AUTOGEN` were added to allow source files to be excluded from processing by :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC`, and :prop_tgt:`AUTORCC` target properties. * A :prop_sf:`VS_COPY_TO_OUT_DIR` source file property was added to tell :ref:`Visual Studio Generators` for VS 2010 and above whether or not a file should e copied to the output directory. * A :prop_tgt:`VS_DEBUGGER_WORKING_DIRECTORY` target property was added to tell :ref:`Visual Studio Generators` for VS 2010 and above what debugger working directory should be set for the target. * A :prop_tgt:`VS_DOTNET_REFERENCES_COPY_LOCAL` target property was added to specify whether to copy referenced assemblies to the output directory. * A :prop_tgt:`VS_DOTNET_REFERENCE_` target property was added to tell :ref:`Visual Studio Generators` for VS 2010 and above to add a .NET reference with a given hint path. * A :prop_sf:`VS_INCLUDE_IN_VSIX` source file property was added to tell :ref:`Visual Studio Generators` for VS 2010 and above whether to include the file in a Visual Studio extension package. * A :prop_sf:`VS_RESOURCE_GENERATOR` source file property was added to give :ref:`Visual Studio Generators` for VS 2010 and above a setting for the resource generator (``C#`` only). * A :prop_tgt:`VS_USER_PROPS` target property was added to tell :ref:`Visual Studio Generators` for VS 2010 and above to use a custom MSBuild user ``.props`` file. * A :prop_gbl:`XCODE_EMIT_EFFECTIVE_PLATFORM_NAME` global property was added to tell the :generator:`Xcode` generator whether to emit the ``EFFECTIVE_PLATFORM_NAME`` variable. This is useful when building with multiple SDKs like ``macosx`` and ``iphoneos`` in parallel. * New :prop_tgt:`XCODE_PRODUCT_TYPE` and :prop_tgt:`XCODE_EXPLICIT_FILE_TYPE` target properties were created to tell the :generator:`Xcode` generator to use custom values of the corresponding attributes for a target in the generated Xcode project. Modules ------- * A :module:`CSharpUtilities` module was added to aid parameterization of Visual Studio C# targets. It provides functions to allow automated setting of source file properties to support Windows Forms, WPF/XAML or other technologies as needed. * The :module:`ExternalData` module learned to support multiple content links for one data file using different hashes, e.g. ``img.png.sha256`` and ``img.png.sha1``. This allows objects to be fetched from sources indexed by different hash algorithms. * The :module:`ExternalProject` module gained the ``GIT_PROGRESS`` option to force Git to show progress when cloning repositories. * The :module:`ExternalProject` module gained a ``GIT_CONFIG`` option to pass ``--config`` options to Git when cloning repositories. * The :module:`FeatureSummary` module :command:`feature_summary` command now accepts a new ``QUIET_ON_EMPTY`` option that suppresses the output when the list of packages that belong to the selected category is empty. * The :module:`FeatureSummary` module :command:`add_feature_info` command now accepts lists of dependencies for deciding whether a feature is enabled or not. * The package types accepted by the :module:`FeatureSummary` module can now be tweaked by changing the :variable:`FeatureSummary_PKG_TYPES`, :variable:`FeatureSummary_REQUIRED_PKG_TYPES` and :variable:`FeatureSummary_DEFAULT_PKG_TYPE` global properties. * The :module:`FindOpenGL` module now provides imported targets ``OpenGL::GL`` and ``OpenGL::GLU`` when the libraries are found. * The :module:`UseSWIG` module gained a ``swig_add_library`` command to give more flexibility over the old ``swig_add_module`` command. * The :module:`UseSWIG` module ``swig_add_source_to_module`` command learned a new ``SWIG_OUTFILE_DIR`` option to control the output file location (``swig -o``). * The :module:`WriteCompilerDetectionHeader` module gained the ``ALLOW_UNKNOWN_COMPILERS`` and ``ALLOW_UNKNOWN_COMPILER_VERSIONS`` options that allow creation of headers that will work also with unknown or old compilers by simply assuming they do not support any of the requested features. CTest ----- * The :command:`ctest_memcheck` command gained a ``DEFECT_COUNT `` option to capture the number of memory defects detected. * The :command:`ctest_memcheck` command learned to read the location of suppressions files for sanitizers from the :variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE` variable. * The :command:`ctest_memcheck` command learned to support ``LeakSanitizer`` independently from ``AddressSanitizer``. * The :command:`ctest_update` command ``CDASH_UPLOAD`` signature was taught to honor the ``RETRY_COUNT``, ``RETRY_DELAY``, and ``QUIET`` options. CPack ----- * The :module:`CPackIFWConfigureFile` module was added to define a new :command:`cpack_ifw_configure_file` command to configure file templates prepared in QtIFW/SDK/Creator style. * The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and :command:`cpack_ifw_configure_component_group` commands gained a new ``DEFAULT``, ``VIRTUAL``, ``FORCED_INSTALLATION``, ``REQUIRES_ADMIN_RIGHTS``, ``DISPLAY_NAME``, ``UPDATE_TEXT``, ``DESCRIPTION``, ``RELEASE_DATE``, ``AUTO_DEPEND_ON`` and ``TRANSLATIONS`` options to more specific configuration. * The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` command gained a new ``DEPENDENCIES`` alias for ``DEPENDS`` option. * The :module:`CPackIFW` module :command:`cpack_ifw_configure_component_group` command gained a new ``DEPENDS`` option. The ``DEPENDENCIES`` alias also added. * The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and :command:`cpack_ifw_configure_component_group` commands ``PRIORITY`` option now is deprecated and will be removed in a future version of CMake. Please use new ``SORTING_PRIORITY`` option instead. * The :cpack_gen:`CPack IFW Generator` gained new :variable:`CPACK_IFW_PACKAGE_WATERMARK`, :variable:`CPACK_IFW_PACKAGE_BANNER`, :variable:`CPACK_IFW_PACKAGE_BACKGROUND`, :variable:`CPACK_IFW_PACKAGE_WIZARD_STYLE`, :variable:`CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH`, :variable:`CPACK_IFW_PACKAGE_WIZARD_DEFAULT_HEIGHT`, and :variable:`CPACK_IFW_PACKAGE_TITLE_COLOR` variables to customize a QtIFW installer look. * The :cpack_gen:`CPack productbuild Generator` gained options to sign packages. See the variables :variable:`CPACK_PRODUCTBUILD_IDENTITY_NAME`, :variable:`CPACK_PRODUCTBUILD_KEYCHAIN_PATH`, :variable:`CPACK_PKGBUILD_IDENTITY_NAME`, and :variable:`CPACK_PKGBUILD_KEYCHAIN_PATH`. * The :cpack_gen:`CPack RPM Generator` learned to omit tags that are not supported by provided ``rpmbuild`` tool. If unsupported tags are set they are ignored and a developer warning is printed out. * The :cpack_gen:`CPack RPM Generator` learned to generate main component package which forces generation of a rpm for defined component without component suffix in filename and package name. See :variable:`CPACK_RPM_MAIN_COMPONENT` variable. * The :cpack_gen:`CPack RPM Generator` learned to generate a single ``debuginfo`` package on demand even if components packaging is used. See :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` variable. * The :cpack_gen:`CPack RPM Generator` learned to support multiple directives per file when using :variable:`CPACK_RPM_USER_FILELIST` variable. Other ----- * CMake functionality using cryptographic hashes now supports SHA-3 algorithms. * A new generator expression ``$`` was added. It resolves to the true-value if the condition is ``1`` and resolves to the false-value if the condition is ``0``. Deprecated and Removed Features =============================== * The :module:`FeatureSummary` module commands :command:`set_package_info`, :command:`set_feature_info`, :command:`print_enabled_features`, and :command:`print_disabled_features` are now deprecated. * The :module:`UseSWIG` module ``swig_add_module`` command is now deprecated in favor of ``swig_add_library``. Other Changes ============= * If a command specified by the :prop_tgt:`_CLANG_TIDY` target property returns non-zero at build time this is now treated as an error instead of silently ignored. * The :command:`ctest_memcheck` command no longer automatically adds ``leak_check=1`` to the options used by ``AddressSanitizer``. The default behavior of ``AddressSanitizer`` is to run `LeakSanitizer` to check leaks unless ``leak_check=0``. * The :command:`ctest_memcheck` command was fixed to correctly append extra sanitizer options read from the :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS` variable to the environment variables used internally by the sanitizers. * The :module:`FeatureSummary` module :command:`set_package_properties` command no longer forces the package type to ``OPTIONAL`` when the type is not explicitly set. * The :manual:`Compile Features ` functionality is now aware of features supported by Intel C++ compilers versions 12.1 through 17.0 on UNIX and Windows platforms. * Calls to the :module:`FindPkgConfig` module :command:`pkg_check_modules` command following a successful call learned to re-evaluate the cached values for a given prefix after changes to the parameters to the command for that prefix. * When using :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC`, generated ``moc_*``, ``*.moc`` and ``ui_*`` are placed in the ``/_autogen/include`` directory which is automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`. It is therefore not necessary anymore to have :variable:`CMAKE_CURRENT_BINARY_DIR` in the target's :prop_tgt:`INCLUDE_DIRECTORIES`. * The :generator:`Sublime Text 2` generator no longer runs the native build command (e.g. ``ninja`` or ``make``) with verbose build output enabled. * The :command:`try_compile` command source file signature now honors the :variable:`CMAKE_WARN_DEPRECATED` variable value in the generated test project. * The :ref:`Visual Studio Generators` for VS 2010 and above now place per-source file flags after target-wide flags when they are classified as raw flags with no project file setting (``AdditionalOptions``). This behavior is more consistent with the ordering of flags produced by other generators, and allows flags on more-specific properties (per-source) to override those on more general ones (per-target). * The precompiled Windows binary MSI package provided on ``cmake.org`` now records the installation directory in the Windows Registry under the key ``HKLM\Software\Kitware\CMake`` with a value named ``InstallDir``. PK!Y index.rstnu[:orphan: CMake Release Notes ******************* .. This file should include the adjacent "dev.txt" file in development versions but not in release versions. Releases ======== .. toctree:: :maxdepth: 1 3.22 <3.22> 3.21 <3.21> 3.20 <3.20> 3.19 <3.19> 3.18 <3.18> 3.17 <3.17> 3.16 <3.16> 3.15 <3.15> 3.14 <3.14> 3.13 <3.13> 3.12 <3.12> 3.11 <3.11> 3.10 <3.10> 3.9 <3.9> 3.8 <3.8> 3.7 <3.7> 3.6 <3.6> 3.5 <3.5> 3.4 <3.4> 3.3 <3.3> 3.2 <3.2> 3.1 <3.1> 3.0 <3.0> PK!!@+,,3.3.rstnu[CMake 3.3 Release Notes *********************** .. only:: html .. contents:: Changes made since CMake 3.2 include the following. New Features ============ Generators ---------- * The :ref:`Makefile Generators` now add ``.DELETE_ON_ERROR`` to the makefiles that contain the actual build rules for files on disk. This tells GNU make to remove rule outputs when their recipe modifies an output but fails. * The :ref:`Visual Studio Generators` learned to support ``.xaml`` source files and automatically associate them with corresponding ``.h`` and ``.cpp`` sources. * A new experimental :generator:`Green Hills MULTI` generator was added on Windows. `Green Hills MULTI`_ is an IDE for embedded real-time systems. .. _`Green Hills MULTI`: http://www.ghs.com/products/MULTI_IDE.html Commands -------- * The :command:`add_dependencies` command learned to allow dependencies to be added to :ref:`interface libraries `. Dependencies added to an interface library are followed transitively in its place since the target itself does not build. * The :command:`execute_process` command learned to support specifying the same file for ``OUTPUT_FILE`` and ``ERROR_FILE``. * The :command:`file(GLOB)` and :command:`file(GLOB_RECURSE)` commands learned a new ``LIST_DIRECTORIES `` option to specify whether the glob result should include directories. * The :command:`find_library`, :command:`find_path`, and :command:`find_file` commands now search in installation prefixes derived from the ``PATH`` environment variable. * The :command:`if` command learned a new ``IN_LIST`` operator that evaluates to true if a given element is contained in a named list. * The :command:`install(EXPORT)` and :command:`export()` commands learned to export targets that populate the :prop_tgt:`INTERFACE_SOURCES` target property. * The :command:`install(TARGETS)` command learned to support generator expressions in the ``DESTINATION`` value. Variables --------- * The version of some Fortran compilers is now detected and stored in the :variable:`CMAKE_Fortran_COMPILER_VERSION _COMPILER_VERSION>` variable. * The :ref:`Visual Studio Generators` learned a new :variable:`CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD` option to put the ``INSTALL`` target in the default build of a solution (``.sln``) file. Properties ---------- * A :prop_tgt:`CROSSCOMPILING_EMULATOR` target property and supporting :variable:`CMAKE_CROSSCOMPILING_EMULATOR` variable were introduced to allow target platform binaries to run on the host during cross compiling. * A :prop_tgt:`_INCLUDE_WHAT_YOU_USE` target property and supporting :variable:`CMAKE__INCLUDE_WHAT_YOU_USE` variable were introduced to tell the :ref:`Makefile Generators` and the :generator:`Ninja` generator to run ``include-what-you-use`` along with the compiler for ``C`` and ``CXX`` languages. * The :prop_tgt:`_VISIBILITY_PRESET` and :prop_tgt:`VISIBILITY_INLINES_HIDDEN` target properties now affect compilation in sources of all target types. See policy :policy:`CMP0063`. * The :prop_tgt:`XCODE_ATTRIBUTE_` target property learned to support generator expressions. Modules ------- * The :module:`CheckFortranCompilerFlag` module was introduced to check ``Fortran`` compiler flags, much like the :module:`CheckCCompilerFlag` module already does for ``C``. * The :module:`ExternalData` module learned a new :variable:`ExternalData_NO_SYMLINKS` option to disable use of symbolic links to populate the real data files and use copies instead. * The :module:`ExternalData` module learned a new ``RECURSE:`` option in ``DATA{}`` references specifying directories. This allows an entire directory tree of associated files to be matched. * The :module:`ExternalData` module learned a new URL template placeholder ``%(algo:)`` to allow custom mapping from algorithm name to URL component through configuration of new :variable:`ExternalData_URL_ALGO__` variables. This allows more flexibility in remote URLs. * The :module:`ExternalProject` module learned to replace tokens like ```` in the ``BYPRODUCTS`` of each step. * The :module:`ExternalProject` module APIs learned to support :manual:`generator expressions ` when using ``LOG_*`` options and in CMake initial cache options. * The :module:`FindBoost` module now tracks the directories containing libraries separately for RELEASE and DEBUG configurations. * The :module:`FindCUDA` module now defaults to using the static CUDA runtime library if it is available. A new ``CUDA_USE_STATIC_CUDA_RUNTIME`` option is offered to control this behavior. * The :module:`FindMatlab` module was completely rewritten. It learned about versions and components and to find Matlab in a more precise and multiplatform way. The module now offers APIs to create mex extensions, documentation, and unit tests. * The :module:`FindPackageHandleStandardArgs` module ``FIND_PACKAGE_HANDLE_STANDARD_ARGS`` function now always populates both the ``_FOUND`` and ``_FOUND`` variables (the latter for backwards compatibility). The ``FOUND_VAR`` option is now ignored except to enforce its allowed values. * The :module:`InstallRequiredSystemLibraries` module learned a new ``CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT`` option to specify the installation component. Generator Expressions --------------------- * A new ``COMPILE_LANGUAGE`` generator expression was introduced to allow specification of compile options for target files based on the :prop_sf:`LANGUAGE` of each source file. Due to limitations of the underlying native build tools, this feature has varying support across generators. See the :manual:`cmake-generator-expressions(7)` manual for details. CTest ----- * The :manual:`ctest(1)` tool learned a new ``--repeat-until-fail `` option to help find sporadic test failures. * The :module:`CTestCoverageCollectGCOV` module learned to support the same ``CTEST_CUSTOM_COVERAGE_EXCLUDE`` option as the :command:`ctest_coverage` command. CPack ----- * The :cpack_gen:`CPack IFW Generator` learned to support Qt Framework Installer 2.0 tools. * The :cpack_gen:`CPack DEB Generator` learned a new :variable:`CPACK_DEBIAN__PACKAGE_SHLIBDEPS` variable to specify per-component use of ``dpkg-shlibdeps``. * The :cpack_gen:`CPack DEB Generator` learned a new :variable:`CPACK_DEBIAN__PACKAGE_DEPENDS` option to specify per-component dependencies. * The :cpack_gen:`CPack RPM Generator` learned to package symbolic links more cleanly and now supports directory symlinks with recent ``rpmbuild`` versions. * The :cpack_gen:`CPack RPM Generator` learned a new :variable:`CPACK_RPM_ADDITIONAL_MAN_DIRS` variable to specify directories containing man pages for the brp-compress RPM macro. * The :cpack_gen:`CPack RPM Generator` learned a new :variable:`CPACK_RPM__PACKAGE_ARCHITECTURE` variable to specify a component-specific package architecture. * The CPack WIX generator learned the new :prop_inst:`CPACK_START_MENU_SHORTCUTS`, :prop_inst:`CPACK_DESKTOP_SHORTCUTS` and :prop_inst:`CPACK_STARTUP_SHORTCUTS` installed file properties which can be used to install shortcuts in the Start Menu, on the Desktop and in the Startup Folder respectively. Other ----- * The :manual:`Compile Features ` functionality is now aware of features supported by GNU compilers on Windows, versions 4.4 through 5.0. * The :manual:`cmake(1)` ``-E tar`` command learned a new ``--format`` option to specify the archive format to be written. * On OS X, CMake learned to create XCTest bundles to test Frameworks and App Bundles within Xcode. The :module:`FindXCTest` module provides convenience functions to handle :prop_tgt:`XCTEST` bundles. Deprecated and Removed Features =============================== * On OS X the :manual:`cmake-gui(1)` no longer has the ``Install For Command Line Use`` menu item. Instead there is a ``How to Install For Command Line Use`` menu item that shows an informational dialog box explaining how to make the command line tools available. For example:: /Applications/CMake.app/Contents/bin/cmake-gui --install * The :command:`ctest_build` and :command:`build_command` commands no longer tell ``make`` tools to ignore errors with the ``-i`` option. Previously this was done for :ref:`Makefile Generators` but not others. See policy :policy:`CMP0061`. * The :generator:`Visual Studio 10 2010` generator no longer checks for running VS IDEs with the project open or asks them to reload. This was originally done for VS 10 because it had been done for VS 7 through 9 to avoid prompting for every project in a solution. Since VS >= 10 allow the whole solution to reload at once they do not need CMake to help them. * The :generator:`Visual Studio 7` generator (.NET 2002) is now deprecated and will be removed in a future version of CMake. * The :generator:`Visual Studio 6` generator is now deprecated and will be removed in a future version of CMake. * The :command:`find_package` command no longer considers project build trees recently configured in a :manual:`cmake-gui(1)`. This was previously done only on Windows and is now never done. The ``NO_CMAKE_BUILDS_PATH`` option is now ignored if given and effectively always on. Projects may populate the :ref:`User Package Registry` to aid users building multiple dependent projects one after another. * The :command:`add_definitions()` command no longer causes a :prop_dir:`DEFINITIONS` directory property to be populated. See policy :policy:`CMP0059`. * With Visual Studio 7, 8, and 9 generators the value of the ``$(OutDir)`` placeholder no longer evaluates to the configuration name. Projects should use ``$(ConfigurationName)`` for that instead. * Using the output of :command:`export()` with the :command:`install(FILES)` command is no longer allowed. See policy :policy:`CMP0062` for details. Other Changes ============= * The :generator:`Ninja` generator now requires that calls to the :command:`add_custom_command` and :command:`add_custom_target` commands use the ``BYPRODUCTS`` option to explicitly specify any files generated by the custom commands that are not listed as outputs (perhaps because their timestamps are allowed to be older than the inputs). See policy :policy:`CMP0058`. * Build-time progress output of :ref:`Makefile Generators` has been improved. It no longer mixes progress and build rule messages during parallel builds. The link rule messages now have progress and are displayed as bold green instead of bold red (since red is often associated with an error message). * The :variable:`CMAKE_CFG_INTDIR` variable value for Visual Studio 7, 8, and 9 is now ``$(ConfigurationName)`` instead of ``$(OutDir)``. This should have no effect on the intended use cases of the variable. * Linking to library files by a full path in an implicit linker search directory (e.g. ``/usr/lib/libfoo.a``) no longer asks the linker to search for the library (e.g. ``-lfoo``) and now links by full path. See policy :policy:`CMP0060`. PK!G|993.9.rstnu[CMake 3.9 Release Notes *********************** .. only:: html .. contents:: Changes made since CMake 3.8 include the following. New Features ============ Languages --------- * ``CUDA`` is now supported by the :ref:`Visual Studio Generators` for VS 2010 and above. This complements the existing support by the :ref:`Makefile Generators` and the :generator:`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 :prop_tgt:`C++ standards ` and :prop_tgt:`C standards ` and their associated meta-features for the following :variable:`compiler ids _COMPILER_ID>`: ``Cray``, ``PGI``, and ``XL``. Generators ---------- * :ref:`Visual Studio Generators` for VS 2010 and above learned to support the ``ASM_NASM`` language when ``nasm`` is installed. * The :generator:`Xcode` generator learned to create Xcode schema files. This is an experimental feature and can be activated by setting the :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable to a ``TRUE`` value. Commands -------- * The :command:`add_library` command ``IMPORTED`` option learned to support :ref:`Object Libraries`. * The :command:`find_library` command learned to search ``libx32`` paths when the build targets the ``x32`` ABI. See the :prop_gbl:`FIND_LIBRARY_USE_LIBX32_PATHS` global property. * The :command:`include_external_msproject` command learned to use the :prop_tgt:`MAP_IMPORTED_CONFIG_` target property to map current configurations to the external configurations. * The :command:`install(TARGETS)` command learned a new ``OBJECTS`` option to specify where to install :ref:`Object Libraries`. * The :command:`install(EXPORT)` command learned how to export :ref:`Object Libraries`. * The :command:`project` command learned an optional ``DESCRIPTION`` parameter to set the :variable:`PROJECT_DESCRIPTION` variable. * The :command:`separate_arguments` command gained a ``NATIVE_COMMAND`` mode that performs argument separation depending on the host operating system. Variables --------- * A :variable:`CMAKE_ANDROID_NDK_DEPRECATED_HEADERS` variable was added for use when :ref:`Cross Compiling for Android with the NDK` to request use of the deprecated headers even when unified headers are available. The default is now to use unified headers if available. * A :variable:`CMAKE_AUTOMOC_DEPEND_FILTERS` variable was introduced to allow :variable:`CMAKE_AUTOMOC` to extract additional dependency file names for ``moc`` from the contents of source files. * A :variable:`CMAKE_AUTOUIC_SEARCH_PATHS` variable was introduced to allow :variable:`CMAKE_AUTOUIC` to search for ``foo.ui`` in more places than the vicinity of the file including ``ui_foo.h``. * A :variable:`CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable was added to tell the :command:`find_library` command to search in a ``lib`` directory before each ``lib`` directory that would normally be searched. * A :variable:`CMAKE_INTERPROCEDURAL_OPTIMIZATION` variable was added to initialize the :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` property on all targets. * A :variable:`CMAKE__COMPILER_AR` variable was added to hold the path to the GCC/Clang wrapper of ``ar``. * A :variable:`CMAKE__COMPILER_RANLIB` variable was added to hold the path to the GCC/Clang wrapper of ``ranlib``. * The :variable:`CMAKE_SYSROOT_COMPILE` and :variable:`CMAKE_SYSROOT_LINK` variables were added to use separate sysroots for compiling and linking. Properties ---------- * A new :prop_tgt:`AUTOGEN_BUILD_DIR` target property was introduced to set a custom output directory for :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC`, and :prop_tgt:`AUTORCC`. * A new :prop_tgt:`AUTOMOC_DEPEND_FILTERS` target property was introduced to allow :prop_tgt:`AUTOMOC` to extract additional dependency file names for ``moc`` from the contents of source files. * A new :prop_tgt:`AUTOUIC_SEARCH_PATHS` target property was introduced to allow :prop_tgt:`AUTOUIC` to search for ``foo.ui`` in more places than the vicinity of the file including ``ui_foo.h``. * Global properties :prop_gbl:`AUTOGEN_SOURCE_GROUP`, :prop_gbl:`AUTOMOC_SOURCE_GROUP` and :prop_gbl:`AUTORCC_SOURCE_GROUP` were introduced to allow files generated by :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTORCC` to be placed in a :command:`source_group`. * A :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR` target property and corresponding :variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` variable were added to control whether to use the :prop_tgt:`INSTALL_NAME_DIR` target property value for binaries in the build tree. This is for macOS ``install_name`` as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` is for ``RPATH``. * A :prop_tgt:`CUDA_PTX_COMPILATION` target property was added to :ref:`Object Libraries` to support compiling to ``.ptx`` files instead of host object files. * A :prop_gbl:`GENERATOR_IS_MULTI_CONFIG` global property was added to determine whether the current generator is a multi-configuration generator (such as :ref:`Visual Studio Generators` or :generator:`Xcode`). * The :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property is now enforced when enabled. CMake will add IPO flags unconditionally or produce an error if it does not know the flags for the current compiler. The project is now responsible to use the :module:`CheckIPOSupported` module to check for IPO support before enabling the target property. See policy :policy:`CMP0069`. * The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property may now be used in combination with explicit ``.def`` files in order to export all symbols from the object files within a target plus an explicit list of symbols that the linker finds in dependencies (e.g. ``msvcrt.lib``). Modules ------- * A :module:`CheckIPOSupported` module was added to help projects check whether interprocedural optimization (IPO) is supported by the current toolchain and CMake version. * The :module:`CMakeFindDependencyMacro` module ``find_dependency`` macro now forwards all arguments to the underlying :command:`find_package` call. Existing uses will continue to function as before, but callers can now access the full suite of arguments that :command:`find_package` accepts. * The :module:`FeatureSummary` module :command:`feature_summary` command now accepts the new ``DEFAULT_DESCRIPTION`` option that will print the default title for the selected package type. * The :module:`FeatureSummary` module gained a new :variable:`FeatureSummary__DESCRIPTION` variable that can be defined for each ```` to replace the type name with the specified string whenever the package type is used in an output string by the module. * The :module:`FindDoxygen` module learned to control Doxygen behavior using CMake variables and generate documentation via the newly added :command:`doxygen_add_docs` function. The Doxygen input file (``Doxyfile``) is automatically generated and doxygen is run as part of a custom target. Additional components can be specified to find optional tools: ``dot``, ``mscgen`` and ``dia``. * The :module:`FindMPI` module now provides imported targets. * The :module:`FindProtobuf` module :command:`protobuf_generate_cpp` command gained an ``EXPORT_MACRO`` option to specify the name of a DLL export markup macro. * The :module:`FindProtobuf` module now supports usage of static libraries for Unix via a new ``Protobuf_USE_STATIC_LIBS`` input variable. * The :module:`FindProtobuf` module now provides imported targets when the libraries are found. * A new :module:`GoogleTest` module was added to provide the :command:`gtest_add_tests` function independently of the :module:`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. CTest ----- * The :command:`ctest_submit` command gained a ``HTTPHEADER`` option to specify custom headers to send during submission. * The :manual:`ctest(1)` executable gained new options which allow the developer to disable automatically adding tests to the test set to satisfy fixture dependencies. ``-FS`` prevents adding setup tests for fixtures matching the provided regular expression, ``-FC`` prevents adding cleanup tests for matching fixtures and ``-FA`` prevents adding any test for matching fixtures. * A :prop_test:`DISABLED` test property was added to mark tests that are configured but explicitly disabled so they do not run. CPack ----- * The :cpack_gen:`CPack Archive Generator` learned to modify the filename per-component. See the :variable:`CPACK_ARCHIVE_FILE_NAME` variable and its per-component version :variable:`CPACK_ARCHIVE__FILE_NAME`. * The :module:`CPackComponent` module :command:`cpack_add_component` command gained a new ``PLIST `` option to specify the ``pkgbuild`` ``--component-plist`` argument when using the :module:`productbuild ` generator. * The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and :command:`cpack_ifw_configure_component_group` commands gained internationalization support for ``DISPLAY_NAME`` and ``DESCRIPTION`` options. * The :cpack_gen:`CPack IFW Generator` learned the new hint :variable:`CPACK_IFW_ROOT` variable for finding the QtIFW tool suite installed in a non-standard place. * The :cpack_gen:`CPack productbuild Generator` gained a new :variable:`CPACK_PRODUCTBUILD_RESOURCES_DIR` variable to specify resources to be copied into the ``Resources`` directory. * The :cpack_gen:`CPack RPM Generator` learned to modify the ``debuginfo`` package name. See the :variable:`CPACK_RPM_DEBUGINFO_FILE_NAME` variable. * The :cpack_gen:`CPack WIX Generator` patching system now has the ability to set additional attributes. This can be done by specifying attributes with the ``CPackWiXFragment`` XML tag after the ``Id`` attribute. See the :variable:`CPACK_WIX_PATCH_FILE` variable. * The :cpack_gen:`CPack WIX Generator` implemented a new :variable:`CPACK_WIX_ROOT_FOLDER_ID` variable which allows using a custom root folder ID instead of the default ``ProgramFilesFolder`` / ``ProgramFiles64Folder``. Other ----- * Interprocedural optimization (IPO) is now supported for GNU and Clang compilers using link time optimization (LTO) flags. See the :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property and :module:`CheckIPOSupported` module. * The ``TARGET_OBJECTS`` :manual:`generator expression ` is now supported by the :command:`add_custom_command` and :command:`file(GENERATE)` commands. * Two new informational generator expressions to retrieve Apple Bundle directories have been added. The first one ``$`` outputs the full path to the Bundle directory, the other one ``$`` outputs the full path to the ``Contents`` directory of macOS Bundles and App Bundles. For all other bundle types and SDKs it is identical with ``$``. The new expressions are helpful to query Bundle locations independent of the different Bundle types and layouts on macOS and iOS. Deprecated and Removed Features =============================== * An explicit deprecation diagnostic was added for policies ``CMP0036`` and below. The :manual:`cmake-policies(7)` manual explains that the OLD behaviors of all policies are deprecated and that projects should always port to the NEW behaviors as soon as possible. * The :generator:`Visual Studio 8 2005` generator is now deprecated and will be removed in a future version of CMake. * The :generator:`Visual Studio 7 .NET 2003` generator has been removed. * The :generator:`Xcode` generator dropped support for Xcode versions older than 3. * The :module:`FindDoxygen` module has deprecated several variables. * The version of curl bundled with CMake no longer accepts URLs of the form ``file://c:/...`` on Windows due to a change in upstream curl 7.52. Use the form ``file:///c:/...`` instead to work on all versions. Other Changes ============= * When using :prop_tgt:`AUTOMOC`, CMake now scans for the presence of the ``Q_PLUGIN_METADATA`` macro and reruns moc when the file from the macro's ``FILE`` argument changes. * When :prop_tgt:`AUTOMOC` detects an include statement of the form ``#include "moc_.cpp"`` the search for the respective header file now looks in the :prop_tgt:`INCLUDE_DIRECTORIES` of the target as well. * When running tests, CTest learned to treat skipped tests (using the :prop_test:`SKIP_RETURN_CODE` property) the same as tests with the new :prop_test:`DISABLED` property. Due to this change, CTest will not indicate failure when all tests are either skipped or pass. * The :generator:`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. * On macOS, ``RPATH`` settings such as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` no longer affect the ``install_name`` field. See policy :policy:`CMP0068`. * The :generator:`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. Updates ======= Changes made since CMake 3.9.0 include the following. 3.9.1 ----- * The ``find_`` command ``PACKAGE_ROOT`` search path group added by CMake 3.9.0 has been removed for the 3.9 series due to regressions caused by new use of ``_ROOT`` variables. The behavior may be re-introduced in the future in a more-compatible way. 3.9.2 ----- * On macOS, the default application bundle ``Info.plist`` file no longer enables Hi-DPI support as it did in 3.9.0 and 3.9.1. The change had to be reverted because it broke iOS applications. * The Xcode generator no longer adds "outputPaths" to custom script build phases as it did in 3.9.0 and 3.9.1. This was added in an attempt to support Xcode 9's new build system, but broke incremental rebuilds for both the old and new Xcode build systems. PK!e"dev/FindGTest-target-for-gmock.rstnu[FindGTest-target-for-gmock -------------------------- * The :module:`FindGTest` module now provides a target for GMock, if found. PK!~h3.22.rstnu[CMake 3.22 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.21 include the following. New Features ============ Commands -------- * The :command:`cmake_host_system_information` command can now query `OS identification variables`_ from the :file:`/etc/os-release` file. * The :command:`string(TIMESTAMP)` command now supports the ``%V`` specifier for ISO 8601 week numbers. .. _`OS identification variables`: https://www.freedesktop.org/software/systemd/man/os-release.html Variables --------- * The :envvar:`CMAKE_BUILD_TYPE` environment variable was added to provide a default value for the :variable:`CMAKE_BUILD_TYPE` variable. * The :envvar:`CMAKE_CONFIGURATION_TYPES` environment variable was added to provide a default value for the :variable:`CMAKE_CONFIGURATION_TYPES` variable. * The :envvar:`CMAKE_INSTALL_MODE` environment variable was added to tell :command:`install` rules (implemented by :command:`file(INSTALL)`) to install symbolic links instead of copying of files. * The :variable:`CMAKE__LINK_WHAT_YOU_USE_FLAG` and :variable:`CMAKE_LINK_WHAT_YOU_USE_CHECK` variables were added to control the linker flag and check used by the :prop_tgt:`LINK_WHAT_YOU_USE` target property. * The :variable:`CMAKE_REQUIRE_FIND_PACKAGE_` variable was added to turn a non-REQUIRED :command:`find_package` call into a REQUIRED one. Properties ---------- * The :prop_tgt:`_EXTENSIONS` target property is now initialized to :variable:`CMAKE__EXTENSIONS_DEFAULT`, detected from the compiler. See :policy:`CMP0128`. * The :prop_sf:`VS_SETTINGS` source file property is now supported for all source file types. Previously it worked only for non-built sources. Modules ------- * The :module:`CMakeDependentOption` module :command:`cmake_dependent_option` macro now supports full :ref:`Condition Syntax`. See policy :policy:`CMP0127`. * The :module:`FetchContent` module now passes through the :variable:`CMAKE_TLS_VERIFY`, :variable:`CMAKE_TLS_CAINFO`, :variable:`CMAKE_NETRC` and :variable:`CMAKE_NETRC_FILE` variables (when defined) to the underlying :module:`ExternalProject` sub-build. Previously, those variables were silently ignored by :module:`FetchContent`. * The :module:`FindBLAS` and :module:`FindLAPACK` modules gained a ``BLA_SIZEOF_INTEGER`` option to find a BLAS/LAPACK whose ABI uses a specific integer size. * The :module:`FindJasper` module now provides an imported target. * The :module:`FindMatlab` module now provides imported targets. * The :module:`FindPkgConfig` module gained a :variable:`PKG_CONFIG_ARGN` variable to specify arguments to ``pkg-config`` calls. * The :module:`GoogleTest` module :command:`gtest_discover_tests` function gained a ``TEST_FILTER`` option to filter tests using ``--gtest_filter`` during test discovery. * The :module:`UseSWIG` module, for :ref:`Visual Studio Generators`, can now use the ``swig`` tool to generate implicit dependencies. CTest ----- * :manual:`ctest(1)` learned to recognize labels attached to a test at run time. Previously it was only possible to attach labels to tests at configure time by using the :prop_test:`LABELS` test property. See :ref:`Additional Test Measurements` for more information. * :manual:`ctest(1)` learned to be able to modify the environment for a test through the :prop_test:`ENVIRONMENT_MODIFICATION` property. This is allows for updates to environment variables based on the environment present at test time. * The :command:`ctest_memcheck` command now also generates a :file:`DynamicAnalysis-Test.xml` file which may be used to submit test results to CDash. CPack ----- * The :cpack_gen:`CPack DEB Generator` gained the option to set :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` to ``zstd``, which enables Zstandard compression for deb packages. * The :cpack_gen:`CPack NSIS Generator` gained a new :variable:`CPACK_NSIS_IGNORE_LICENSE_PAGE` variable to suppress the license page in the installer. * The :cpack_gen:`CPack RPM Generator` gained the :variable:`CPACK_RPM_REQUIRES_EXCLUDE_FROM` option to avoid scanning specific paths for dependencies. Deprecated and Removed Features =============================== * The :generator:`Visual Studio 10 2010` generator is now deprecated and will be removed in a future version of CMake. Other Changes ============= * The :manual:`Compile Features ` functionality now correctly disables or enables compiler extensions when no standard level is specified and avoids unnecessarily adding language standard flags if the requested settings match the compiler's defaults. See :policy:`CMP0128`. * The :manual:`Compile Features ` functionality now ignores features for languages that are not enabled. * The :ref:`Ninja Generators` now implement the ``edit_cache`` target using :manual:`ccmake(1)` if available. * The :generator:`Ninja` and :generator:`NMake Makefiles` generators now use the MSVC ``-external:I`` flag for system includes. This became available as of VS 16.10 (toolchain version 14.29.30037). * The :cpack_gen:`CPack NSIS Generator` now requires NSIS 3.03 or later. PK!8|;;3.15.rstnu[CMake 3.15 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.14 include the following. New Features ============ Generators ---------- * The :generator:`Xcode` generator now supports per-target schemes. See the :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable and :prop_tgt:`XCODE_GENERATE_SCHEME` target property. * The :generator:`Green Hills MULTI` generator has been updated: * It now supports the :command:`add_custom_command` and :command:`add_custom_target` commands. * It is now available on Linux. Languages --------- * Preliminary support for the ``Swift`` language was added to the :generator:`Ninja` generator: * Use the :envvar:`SWIFTC` environment variable to specify a compiler. * The :prop_tgt:`Swift_DEPENDENCIES_FILE` target property and :prop_sf:`Swift_DEPENDENCIES_FILE` source file property were added to customize dependency files. * The :prop_tgt:`Swift_MODULE_NAME` target property was added to customize the Swift module name. * The :prop_sf:`Swift_DIAGNOSTICS_FILE` source property was added to indicate where to write the serialized 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 :envvar:`CMAKE_GENERATOR` environment variable was added to specify a default generator to use when :manual:`cmake(1)` is run without a ``-G`` option. Additionally, environment variables :envvar:`CMAKE_GENERATOR_PLATFORM`, :envvar:`CMAKE_GENERATOR_TOOLSET`, and :envvar:`CMAKE_GENERATOR_INSTANCE` were created to configure the generator. * The :manual:`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 :manual:`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 :manual:`cmake(1)` command learned a new CLI option ``--loglevel``. * The :manual:`cmake(1)` ``-E remove_directory`` command-line tool learned to support removing multiple directories. * The :manual:`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 :command:`add_custom_command` and :command:`add_custom_target` commands gained a new ``JOB_POOL`` option that works with the :generator:`Ninja` generator to set the pool variable on the build statement. * The :command:`add_library` command ``ALIAS`` option learned to support import libraries of the ``UNKNOWN`` type. * The :command:`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 :command:`execute_process` command gained a ``COMMAND_ECHO`` option and supporting :variable:`CMAKE_EXECUTE_PROCESS_COMMAND_ECHO` variable to enable echoing of the command-line string before execution. * The :command:`file(INSTALL)` command learned a new argument, ``FOLLOW_SYMLINK_CHAIN``, which can be used to recursively resolve and install symlinks. * :command:`list` learned new sub-commands: ``PREPEND``, ``POP_FRONT`` and ``POP_BACK``. * The :command:`message` command learned new types: ``NOTICE``, ``VERBOSE``, ``DEBUG`` and ``TRACE``. * The :command:`string` learned a new sub-command ``REPEAT``. Variables --------- * The :variable:`CMAKE_CROSSCOMPILING_EMULATOR` variable and corresponding :prop_tgt:`CROSSCOMPILING_EMULATOR` target property learned to support arguments to the emulator. * The :variable:`CMAKE_FIND_PACKAGE_PREFER_CONFIG` variable was added to tell :command:`find_package` calls to look for a package configuration file first even if a find module is available. * The :variable:`CMAKE_FRAMEWORK` variable was added to initialize the :prop_tgt:`FRAMEWORK` property on all targets. * The :variable:`CMAKE_VS_JUST_MY_CODE_DEBUGGING` variable and :prop_tgt:`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 :variable:`CMAKE_MSVC_RUNTIME_LIBRARY` variable and :prop_tgt:`MSVC_RUNTIME_LIBRARY` target property were introduced to select the runtime library used by compilers targeting the MSVC ABI. See policy :policy:`CMP0091`. * The :variable:`CMAKE_PROJECT_INCLUDE` and :variable:`CMAKE_PROJECT_INCLUDE_BEFORE` variables were added to allow injection of custom code at the sites of :command:`project` calls without knowing the project name a priori. Properties ---------- * The :prop_tgt:`ADDITIONAL_CLEAN_FILES` target property and :prop_dir:`ADDITIONAL_CLEAN_FILES` directory property were added. They allow to register additional files that should be removed during the clean stage. * The :prop_tgt:`PUBLIC_HEADER` and :prop_tgt:`PRIVATE_HEADER` properties may now be set on :ref:`Interface Libraries`. The headers specified by those properties can be installed using the :command:`install(TARGETS)` command by passing the ``PUBLIC_HEADER`` and ``PRIVATE_HEADER`` arguments respectively. * The :prop_tgt:`VS_PACKAGE_REFERENCES` target property was added to tell :ref:`Visual Studio Generators` to add references to ``nuget`` packages. * The :prop_tgt:`VS_PROJECT_IMPORT` target property was added to allow managed Visual Studio project files to import external ``.props`` files. * The :prop_tgt:`VS_NO_SOLUTION_DEPLOY` target property was added to tell :ref:`Visual Studio Generators` whether to deploy an artifact to the WinCE or Windows Phone target device. Modules ------- * The :module:`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 :command:`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 :command:`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 :policy:`CMP0093`. * The :module:`FindCups` module now provides imported targets. * The :module:`FindEnvModules` module was added to use Lua- and TCL-based environment modules in :ref:`CTest Scripts `. * The :module:`FindGLEW` module now provides an interface more consistent with what upstream GLEW provides in its own CMake package files. * The :module:`FindPkgConfig` now populates :prop_tgt:`INTERFACE_LINK_OPTIONS` property of imported targets with other (non-library) linker flags. * The :module:`FindPostgreSQL` module learned to find debug and release variants separately. * Modules :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython` gained additional lookup strategies and controls, and a new default. See policy :policy:`CMP0094`. * Modules :module:`FindPython`, :module:`FindPython2` and :module:`FindPython3` gain a new target (respectively ``Python::Module``, ``Python2::Module`` and ``Python3::Module``) which can be used to develop Python modules. * Modules :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython` gain capability to control how virtual environments are handled. * The :module:`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 :manual:`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. * The ``$`` and ``$`` :manual:`generator expressions ` were added. * The ``$`` generator expression was introduced to allow specification of compile options for target files based on the :variable:`CMAKE__COMPILER_ID` and :prop_sf:`LANGUAGE` of each source file. * A ``$`` :manual:`generator expression ` has been added. * A ``$`` :manual:`generator expression ` has been added. * The ``$`` :manual:`generator expression ` gained support for a list of paths. * New ``$`` :manual:`generator expressions ` were added to retrieve the prefix, base name, and suffix of the file names of various artifacts: * ``$`` * ``$`` * ``$`` * ``$`` * ``$`` * ``$`` * ``$`` * The ``$`` :manual:`generator expression ` is now supported on ``SHARED``, ``STATIC``, ``MODULE`` libraries and executables. CTest ----- * The :command:`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 :command:`ctest_update` command learned to honor a new variable: :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_gen:`CPack IFW Generator` gained a new :variable:`CPACK_IFW_PACKAGE_STYLE_SHEET` variable to customize the installer stylesheet. Deprecated and Removed Features =============================== * The :manual:`cmake-server(7)` mode has been deprecated and will be removed from a future version of CMake. Please port clients to use the :manual:`cmake-file-api(7)` instead. * The :prop_dir:`ADDITIONAL_MAKE_CLEAN_FILES` directory property is now deprecated. Use the :prop_dir:`ADDITIONAL_CLEAN_FILES` directory property instead. * The variable :variable:`CMAKE_AUTOMOC_RELAXED_MODE` is considered deprecated. Support still exists but will be removed in future versions. * The :command:`export(PACKAGE)` command now does nothing unless enabled via :variable:`CMAKE_EXPORT_PACKAGE_REGISTRY`. See policy :policy:`CMP0090`. * The :generator:`Xcode` generator now requires at least Xcode 5. * An explicit deprecation diagnostic was added for policy ``CMP0066`` (``CMP0065`` and below were already deprecated). The :manual:`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 ============= * If a feature specified by :command:`target_compile_features` is available in the compiler's default standard level, CMake 3.14 and below incorrectly added unnecessary ``-std=`` flags that could lower the standard level. This bug has been fixed in CMake 3.15. This behavior change may expose bugs in existing projects that were relying on undocumented implementation details. Specifying compile features only ensures that the compiler runs in a mode that has those features, not that any specific standard level is used or explicit ``-std=`` flag passed. * 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 :variable:`CMAKE__FLAGS` no longer contains warning flags like ``/W3`` by default. See policy :policy:`CMP0092`. * IBM Clang-based XL compilers that define ``__ibmxl__`` now use the compiler id ``XLClang`` instead of ``XL``. See policy :policy:`CMP0089`. * The :command:`file(REMOVE)` and :command:`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. Updates ======= Changes made since CMake 3.15.0 include the following. 3.15.1 ------ * In CMake 3.15.0 support for the GNU-like ``Clang`` compiler targeting the MSVC ABI implemented :variable:`CMAKE_CXX_STANDARD` values 98 and 11 using the corresponding ``-std=`` flags. However, these modes do not work with the MSVC standard library. Therefore CMake 3.15.1 passes C++14 standard flags even for C++98 and C++11. This is consistent with MSVC itself which always runs in a mode aware of C++14. * Preliminary Swift support added in 3.15.0 has been updated. 3.15.2 ------ * In CMake 3.15.0 and 3.15.1 the :variable:`CMAKE_FIND_PACKAGE_PREFER_CONFIG` variable caused the :command:`find_package` command to fail on a missing package even without the ``REQUIRED`` option. This has been fixed. 3.15.3 ------ * ``CrayPrgEnv`` compiler wrapper support has been updated for the 19.06 release of the Cray Programming Environment for which the default linking mode on XC Cray systems is now dynamic instead of static. 3.15.4 ------ * In CMake 3.15.0 through 3.15.3, the :prop_dir:`EXCLUDE_FROM_ALL` directory property was regressed from pre-3.14 behavior and caused targets within the directory to be excluded even from its own "all". This has been fixed. The bug also existed in 3.14.0 through 3.14.6 and is fixed in 3.14.7. PK!^4^43.16.rstnu[CMake 3.16 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.15 include the following. New Features ============ Languages --------- * CMake learned to support the Objective C (``OBJC``) and Objective C++ (``OBJCXX``) languages. They may be enabled via the :command:`project` and :command:`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 :prop_tgt:`ENABLE_EXPORTS` target property now produce a linker import file with a ``.imp`` extension in addition to the executable file. Plugins (created via :command:`add_library` with the ``MODULE`` option) that use :command:`target_link_libraries` to link to the executable for its symbols are now linked using the import file. The :command:`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 :variable:`CMAKE_SHARED_LINKER_FLAGS` or :variable:`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 :variable:`CMAKE_EXE_LINKER_FLAGS` variable). Command-Line ------------ * :manual:`cmake(1)` ``-E`` now supports ``true`` and ``false`` commands, which do nothing while returning exit codes of 0 and 1, respectively. * :manual:`cmake(1)` gained a ``--trace-redirect=`` command line option that can be used to redirect ``--trace`` output to a file instead of ``stderr``. * The :manual:`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 :command:`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 :command:`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 :module:`GetPrerequisites`. * The :command:`find_file`, :command:`find_library`, :command:`find_path`, :command:`find_package`, and :command:`find_program` commands have learned to check the following variables to control the default behavior for groups of search locations: * :variable:`CMAKE_FIND_USE_PACKAGE_ROOT_PATH` - Controls the default behavior of searching the :variable:`_ROOT` variables. * :variable:`CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH` - Controls the default behavior of searching the CMake-specific environment variables. * :variable:`CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH` - Controls the default behavior of searching the standard system environment variables. * :variable:`CMAKE_FIND_USE_CMAKE_PATH` - Controls the default behavior of searching the CMake-specific cache variables. * :variable:`CMAKE_FIND_USE_CMAKE_SYSTEM_PATH` - Controls the default behavior of searching the platform-specific CMake variables. * The :command:`find_package` command has learned to check the :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` variable to control the default behavior of searching the CMake user package registry and to check the :variable:`CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY` variable to control the default behavior of searching the CMake system package registry. * The :command:`message` command learned indentation control with the new :variable:`CMAKE_MESSAGE_INDENT` variable. * The :command:`target_precompile_headers` command was added to specify a list of headers to precompile for faster compilation times. Variables --------- * The :variable:`CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS` variable has been introduced to optionally initialize the :prop_tgt:`CUDA_RESOLVE_DEVICE_SYMBOLS` target property. * The :variable:`CMAKE_ECLIPSE_RESOURCE_ENCODING` variable was added to specify the resource encoding for the the :generator:`Eclipse CDT4` extra generator. * The :variable:`CMAKE_UNITY_BUILD` variable was added to initialize the :prop_tgt:`UNITY_BUILD` target property to tell generators to batch include source files for faster compilation times. Properties ---------- * The :prop_tgt:`BUILD_RPATH` and :prop_tgt:`INSTALL_RPATH` target properties now support :manual:`generator expressions `. * The :prop_tgt:`INSTALL_REMOVE_ENVIRONMENT_RPATH` target property was added to remove compiler-defined ``RPATH`` entries from a target. This property is initialized by the :variable:`CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH` variable. * The :prop_tgt:`PRECOMPILE_HEADERS` target property was added to specify a list of headers to precompile for faster compilation times. Set it using the :command:`target_precompile_headers` command. * The :prop_tgt:`UNITY_BUILD` target property was added to tell generators to batch include source files for faster compilation times. * The :prop_tgt:`VS_CONFIGURATION_TYPE` target property now supports :manual:`generator expressions `. * The :prop_tgt:`VS_DPI_AWARE` target property was added to tell :ref:`Visual Studio Generators` to set the ``EnableDpiAwareness`` property in ``.vcxproj`` files. * The :prop_tgt:`XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING` target property was added to tell the :generator:`Xcode` generator to set the value of the ``Allow debugging when using document Versions Browser`` schema option. Modules ------- * The :module:`FindDoxygen` module :command:`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 :module:`FindGnuTLS` module now provides an imported target. * The :module:`FindPackageHandleStandardArgs` module :command:`find_package_handle_standard_args` command gained a new ``REASON_FAILURE_MESSAGE`` option to specify a message giving the reason for the failure. * The :module:`FindPkgConfig` module :command:`pkg_search_module` macro now defines a ``_MODULE_NAME`` result variable containing the first matching module name. * The :module:`FindPython3` and :module:`FindPython` modules gained options to control which ``ABIs`` will be searched. * The :module:`FindPython3`, :module:`FindPython2`, and :module:`FindPython` modules now support direct specification of artifacts via cache entries. Autogen ------- * When using :prop_tgt:`AUTOMOC`, the new :variable:`CMAKE_AUTOMOC_PATH_PREFIX` variable or :prop_tgt:`AUTOMOC_PATH_PREFIX` target property may be enabled to generate 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 :command:`include directory `). Also it ensures that ``moc`` output files will compile correctly when the source and/or build directory is a symbolic link. CTest ----- * :manual:`ctest(1)` now has the ability to schedule tests based on resource requirements for each test. See :ref:`ctest-resource-allocation` for details. * A new test property, :prop_test:`SKIP_REGULAR_EXPRESSION`, has been added. This property is similar to :prop_test:`FAIL_REGULAR_EXPRESSION` and :prop_test:`PASS_REGULAR_EXPRESSION`, but with the same meaning as :prop_test:`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 :prop_test:`SKIP_RETURN_CODE`. CPack ----- * :manual:`cpack(1)` learned support for multiple configurations for ``-C`` option. * The :cpack_gen:`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 :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` and :variable:`CPACK_DEBIAN__DESCRIPTION` variables. * The :cpack_gen:`CPack Archive Generator` learned to generate ``.tar.zst`` packages with Zstandard compression. .. _`Debian Policy Manual`: https://www.debian.org/doc/debian-policy/ch-controlfields.html#description Deprecated and Removed Features =============================== * An explicit deprecation diagnostic was added for policy ``CMP0067`` (``CMP0066`` and below were already deprecated). The :manual:`cmake-policies(7)` manual explains that the OLD behaviors of all policies are deprecated and that projects should port to the NEW behaviors. * The :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` variable has been deprecated. Use the :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` variable instead. * The :module:`GetPrerequisites` module has been deprecated, as it has been superseded by :command:`file(GET_RUNTIME_DEPENDENCIES)`. * The ``CPACK_INSTALL_SCRIPT`` variable has been deprecated in favor of the new, more accurately named :variable:`CPACK_INSTALL_SCRIPTS` variable. Other Changes ============= * The :manual:`cmake(1)` ``-C `` option now evaluates the initial cache script with :variable:`CMAKE_SOURCE_DIR` and :variable:`CMAKE_BINARY_DIR` set to the top-level source and build trees. * The :manual:`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 :manual:`ctest(1)` ``--build-makeprogram`` command-line option now specifies the make program used when configuring a project with the :generator:`Ninja` generator or the :ref:`Makefile Generators`. * The :module:`ExternalProject` module :command:`ExternalProject_Add` command has been updated so that ``GIT_SUBMODULES ""`` initializes no submodules. See policy :policy:`CMP0097`. * The :module:`FindGTest` module has been updated to recognize MSVC build trees generated by GTest 1.8.1. * The :command:`project` command no longer strips leading zeros in version components. See policy :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 :policy:`CMP0095`. * When using :variable:`CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS` on Windows the auto-generated exports are now updated only when the object files providing the symbols are updated. Updates ======= Changes made since CMake 3.16.0 include the following. 3.16.2 ------ * CMake 3.16.0 and 3.16.1 processed ``.hh`` files with :prop_tgt:`AUTOMOC`. This was a behavior change from CMake 3.15 and below that can break existing projects, so it has been reverted as of 3.16.2. 3.16.5 ------ * The :module:`FindPython`, :module:`FindPython2`, and :module:`FindPython3` modules no longer create cache entries for ``Python{,2,3}_LIBRARY_RELEASE`` and ``Python{,2,3}_LIBRARY_DEBUG``. Those values are always computed from other results and so should not be cached. The entries were created by CMake 3.16.0 through 3.16.4 but were always ``FORCE``-set and could not be meaningfully edited by users. Additionally, the modules no longer expose their internal ``_Python*`` cache entries publicly. CMake 3.16.0 through 3.16.4 accidentally made them visible as advanced cache entries. 3.16.7 ------ * Selection of the Objective C or C++ compiler now considers the :envvar:`CC` or :envvar:`CXX` environment variable if the :envvar:`OBJC` or :envvar:`OBJCXX` environment variable is not set. * The :module:`FindPkgConfig` module now extracts include directories prefixed with ``-isystem`` into the ``*_INCLUDE_DIRS`` variables and :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target properties. Previously they would be places in ``*_CFLAGS_OTHER`` variables and :prop_tgt:`INTERFACE_COMPILE_OPTIONS` target properties. 3.16.9 ------ * The default value of :variable:`CMAKE_AUTOMOC_PATH_PREFIX` was changed to ``OFF`` because this feature can break existing projects that have identically named header files in different include directories. This restores compatibility with behavior of CMake 3.15 and below. PK!Pxa4a43.6.rstnu[CMake 3.6 Release Notes *********************** .. only:: html .. contents:: 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__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__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:`_CLANG_TIDY` target property and supporting :variable:`CMAKE__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 initialized 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 `__. * 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 :cpack_gen:`CPack DEB Generator` learned how to handle ``$ORIGIN`` in ``CMAKE_INSTALL_RPATH`` when :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` is used for dependency auto detection. * The :cpack_gen:`CPack DEB Generator` learned how to generate ``DEBIAN/shlibs`` control file when package contains shared libraries. * The :cpack_gen:`CPack DEB Generator` 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 :cpack_gen:`CPack DEB Generator` learned how to generate dependencies between Debian packages if multi-component setup is used and :variable:`CPACK_COMPONENT__DEPENDS` variables are set. For backward compatibility this feature is disabled by default. See :variable:`CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS`. * The :cpack_gen:`CPack DEB Generator` learned how to set custom package file names including how to generate properly-named Debian packages:: _-_.deb For backward compatibility this feature is disabled by default. See :variable:`CPACK_DEBIAN_FILE_NAME` and :variable:`CPACK_DEBIAN__FILE_NAME`. * The :cpack_gen:`CPack DEB Generator` 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 :cpack_gen:`CPack DEB Generator` learned how to set the package architecture per-component. See :variable:`CPACK_DEBIAN__PACKAGE_ARCHITECTURE`. * The :cpack_gen:`CPack DragNDrop Generator` learned a new option 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 :cpack_gen:`CPack RPM Generator` 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 :cpack_gen:`CPack RPM Generator` 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 :cpack_gen:`CPack RPM Generator` 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__PACKAGE_NAME`. * The :cpack_gen:`CPack RPM Generator` learned how to correctly handle symlinks that are pointing outside generated packages. Other ----- * The :manual:`Compile Features ` 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 ``/bin`` directories in the ``PATH`` just for their tools do not necessarily want any supporting ``/lib`` directories searched. One may set the ``CMAKE_PREFIX_PATH`` environment variable with a :ref:`semicolon-separated list ` 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 `` 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 :cpack_gen:`CPack RPM Generator` 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. PK!sFF3.14.rstnu[CMake 3.14 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.13 include the following. New Features ============ Generators ---------- * The :generator:`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 VS 2019 generator differs from generators for earlier versions in that it does not provide variants that specify the target platform in the generator name. Instead :variable:`CMAKE_GENERATOR_PLATFORM` must be used, e.g. through the ``-A`` command-line option. Furthermore, the default target platform (architecture) is now based on the *host* platform. The VS host toolset selection is now based on the host architecture as well. * The :generator:`Green Hills MULTI` generator has been updated: * Now supports :ref:`Object Libraries`. * Now warns on unsupported project types such as shared libraries. * Now generates a top-level ``.top.gpj`` for each directory calling the :command:`project` command. The top-level project file ``default.gpj`` is no longer created. * Now honors target renaming and destination output control properties such as :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` and :prop_tgt:`OUTPUT_NAME`. This also fixes support for installation rules generated by :command:`install`. * Now honors source file properties :prop_sf:`INCLUDE_DIRECTORIES`, :prop_sf:`COMPILE_DEFINITIONS`, and :prop_sf:`COMPILE_OPTIONS`. * Now supports Dynamic Download Integrity Applications which did not include Integrate Files via :prop_tgt:`GHS_INTEGRITY_APP` and setting a target link flag of ``-dynamic``. * The contents of project files now sorts sources groups and files by name. Set the :prop_tgt:`GHS_NO_SOURCE_GROUP_FILE` target property to ``ON`` to generate a single project file for the target instead of a project file for each source group. Set the :variable:`CMAKE_GHS_NO_SOURCE_GROUP_FILE` variable to enable this for all targets. File-Based API -------------- * A file-based api for clients to get semantic buildsystem information has been added. See the :manual:`cmake-file-api(7)` manual. This is intended to replace the :manual:`cmake-server(7)` mode for IDEs. Platforms --------- * CMake now supports :ref:`Cross Compiling for iOS, tvOS, or watchOS` using simple toolchain files. Command-Line ------------ * The :manual:`cmake(1)` :ref:`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 :manual:`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 :manual:`cmake-gui(1)` dialog gained new ``-S`` and ``-B`` arguments to explicitly specify source and build directories. Commands -------- * The :command:`file` command learned a new sub-command, ``CREATE_LINK``, which can be used to create hard or symbolic links. * The :command:`file` command learned a new sub-command, ``READ_SYMLINK``, which can be used to determine the path that a symlink points to. * The :command:`file` command gained a ``SIZE`` mode to get the size of a file on disk. * The :command:`find_package` command learned to optionally resolve symbolic links in the paths to package configuration files. See the :variable:`CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable. * The :command:`get_filename_component` command gained new ``LAST_EXT`` and ``NAME_WLE`` variants to work with the extension after the last ``.`` in the name. * The :command:`if` command gained support for checking if cache variables are defined with the ``DEFINED CACHE{VAR}`` syntax. * The :command:`install(CODE)` and :command:`install(SCRIPT)` commands learned to support generator expressions. See policy :policy:`CMP0087`. * The :command:`install(TARGETS)` command learned how to install to an appropriate default directory for a given target type, based on variables from the :module:`GNUInstallDirs` module and built-in defaults, in lieu of a ``DESTINATION`` argument. * The :command:`install(FILES)` and :command:`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 :module:`GNUInstallDirs` and built-in defaults, in lieu of a ``DESTINATION`` argument. * The :command:`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 :command:`list` operation ``REMOVE_AT`` now indicates that the given indices are invalid for a non-existent variable or empty list. * The :command:`try_compile` and :command:`try_run` commands gained a new ``LINK_OPTIONS`` option. Variables --------- * A :variable:`CMAKE_BUILD_RPATH_USE_ORIGIN` variable and corresponding :prop_tgt:`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. * A :variable:`CMAKE_VS_PLATFORM_NAME_DEFAULT` variable was added for :ref:`Visual Studio Generators` to report their default platform used when :variable:`CMAKE_GENERATOR_PLATFORM` is not set explicitly. Properties ---------- * A :prop_gbl:`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 :prop_tgt:`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 :prop_tgt:`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 :prop_tgt:`EXCLUDE_FROM_ALL` property is set to ``OFF``, even if its containing directory is marked as :prop_dir:`EXCLUDE_FROM_ALL`. * :prop_tgt:`INTERFACE_POSITION_INDEPENDENT_CODE` target property gains the support of :manual:`generator expressions `. Modules ------- * The family of modules to check capabilities (like :module:`CheckCSourceCompiles`) gain capability to manage ``LINK_OPTIONS``. * A :module:`CheckFortranSourceRuns` module was added to provide a :command:`check_fortran_source_runs` command to check if a Fortran source snippet compiles and runs. * The :module:`CMakePackageConfigHelpers` module's :command:`write_basic_package_version_file` command gained a new ``ARCH_INDEPENDENT`` option for supporting architecture-independent packages. * The :module:`ExternalProject` module :command:`ExternalProject_Add` command gained ``LOG_DIR`` and ``LOG_MERGED_STDOUTERR`` options to control logging. * The :module:`ExternalProject` module :command:`ExternalProject_Add` command gained ``LOG_PATCH`` to optionally log the patch step. * The :module:`ExternalProject` module :command:`ExternalProject_Add` command learned to apply ``SOURCE_SUBDIR`` when ``BUILD_IN_SOURCE`` is also used. The ``BUILD_COMMAND`` is run in the given ``SOURCE_SUBDIR`` of the ``SOURCE_DIR``. * The :module:`FetchContent` module gained a new :command:`FetchContent_MakeAvailable` command. It accepts a list of dependency names, which it then iterates over, populating and adding each one to the main build using the canonical pattern. This significantly reduces the amount of boilerplate needed in a project. * The :module:`FindBISON` module's ``BISON_TARGET`` command now runs ``bison`` with :variable:`CMAKE_CURRENT_BINARY_DIR` as the working directory. See policy :policy:`CMP0088`. * The :module:`FindCURL` module gained support for requesting protocols as package components. * The :module:`FindFontconfig` module was added to find `fontconfig`_. * The :module:`FindGDAL` module now provides imported targets. * The :module:`FindGIF` module now provides imported targets. * The :module:`FindGit` module now provides an imported target for the Git executable. * The :module:`FindIce` module learned to find ``slice2confluence`` and ``slice2matlab``. * The :module:`FindLibinput` module was added to find `libinput`_. * The :module:`FindLibLZMA` module now provides imported targets. * The :module:`FindMatlab` module gained new options ``R2017b`` and ``R2018a`` to specify the MEX API version to use; these options mirror the new options to the ``mex`` command in MATLAB R2018a. The option ``MX_LIBRARY`` is no longer needed. * The :module:`FindPostgreSQL` module now provides imported targets. * The :module:`FindPython`, :module:`FindPython2`, and :module:`FindPython3` modules gained support for ``NumPy`` component. * The :module:`FindPython2`, :module:`FindPython3`, and :module:`FindPython` modules now support running in script mode by skipping the creation of imported targets and helper functions. * The :module:`FindSQLite3` module was added to find the SQLite v3.x library. * The :module:`FindX11` had the following variables renamed in order to match their library names rather than header names. The old variables are provided for compatibility: - ``X11_Xxf86misc_INCLUDE_PATH`` instead of ``X11_xf86misc_INCLUDE_PATH`` - ``X11_Xxf86misc_LIB`` instead of ``X11_xf86misc_LIB`` - ``X11_Xxf86misc_FOUND`` instead of ``X11_xf86misc_FOUND`` - ``X11_Xxf86vm_INCLUDE_PATH`` instead of ``X11_xf86vmode_INCLUDE_PATH`` - ``X11_Xxf86vm_LIB`` instead of ``X11_xf86vmode_LIB`` - ``X11_Xxf86vm_FOUND`` instead of ``X11_xf86vmode_FOUND`` - ``X11_xkbfile_INCLUDE_PATH`` instead of ``X11_Xkbfile_INCLUDE_PATH`` - ``X11_xkbfile_LIB`` instead of ``X11_Xkbfile_LIB`` - ``X11_xkbfile_FOUND`` instead of ``X11_Xkbfile_FOUND`` - ``X11_Xtst_INCLUDE_PATH`` instead of ``X11_XTest_INCLUDE_PATH`` - ``X11_Xtst_LIB`` instead of ``X11_XTest_LIB`` - ``X11_Xtst_FOUND`` instead of ``X11_XTest_FOUND`` - ``X11_Xss_INCLUDE_PATH`` instead of ``X11_Xscreensaver_INCLUDE_PATH`` - ``X11_Xss_LIB`` instead of ``X11_Xscreensaver_LIB`` - ``X11_Xss_FOUND`` instead of ``X11_Xscreensaver_FOUND`` The following variables are deprecated completely since they were essentially duplicates: - ``X11_Xinput_INCLUDE_PATH`` (use ``X11_Xi_INCLUDE_PATH``) - ``X11_Xinput_LIB`` (use ``X11_Xi_LIB``) - ``X11_Xinput_FOUND`` (use ``X11_Xi_FOUND``) * The :module:`FindX11` now provides ``X11_Xext_INCLUDE_PATH``. * The :module:`FindX11` now provides imported targets. * The :module:`UseSWIG` module learned to pass ``-module `` to the ``SWIG`` compiler if the file property ``SWIG_MODULE_NAME`` is defined. See policy :policy:`CMP0086`. * The :module:`UseSWIG` module gained an option to specify ``SWIG`` source file extensions. .. _`fontconfig`: https://www.freedesktop.org/wiki/Software/fontconfig/ .. _`libinput`: https://www.freedesktop.org/wiki/Software/libinput/ Generator Expressions --------------------- * The ``$`` and ``$`` :manual:`generator expressions ` were added. * The ``$`` generator expression now correctly handles an empty argument. See :policy:`CMP0085` for details. Autogen ------- * The :prop_tgt:`AUTOMOC_EXECUTABLE`, :prop_tgt:`AUTORCC_EXECUTABLE`, and :prop_tgt:`AUTOUIC_EXECUTABLE` target properties were added. They all take a path to an executable and force automoc/autorcc/autouic to use this executable. Setting these will also prevent the configure time testing for these executables. This is mainly useful when you build these tools yourself. * The new variables :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`, :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME`, :variable:`CMAKE_GLOBAL_AUTORCC_TARGET` and :variable:`CMAKE_GLOBAL_AUTORCC_TARGET_NAME` control the generation of global ``autogen`` and ``autorcc`` targets. * A new :variable:`CMAKE_AUTOGEN_ORIGIN_DEPENDS` variable and :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` target property may be set to enable or disable forwarding of the origin target dependencies to the corresponding ``_autogen`` target. CTest ----- * :manual:`ctest(1)` gained a ``--show-only=json-v1`` option to show the list of tests in a machine-readable JSON format. See the :ref:`Show as JSON Object Model` section of the manual. * The :command:`ctest_submit` command learned a new ``Done`` part that can be used to inform CDash that a build is complete and that no more parts will be uploaded. * CTest learned to accept the dashboard server submission URL from a single variable. See the ``SubmitURL`` setting in :manual:`ctest(1)`, the :variable:`CTEST_SUBMIT_URL` variable, and the ``SUBMIT_URL`` argument of the :command:`ctest_submit` command. Deprecated and Removed Features =============================== * An explicit deprecation diagnostic was added for policies ``CMP0064`` and ``CMP0065`` (``CMP0063`` and below were already deprecated). The :manual:`cmake-policies(7)` manual explains that the OLD behaviors of all policies are deprecated and that projects should port to the NEW behaviors. * The :generator:`Xcode` generator deprecated support for Xcode versions prior to Xcode 5. Support for those will be dropped in a future version of CMake. * The :module:`FindQt` module is no longer used by the :command:`find_package` command as a find module. This allows the Qt Project upstream to optionally provide its own ``QtConfig.cmake`` package configuration file and have applications use it via ``find_package(Qt)`` rather than ``find_package(Qt CONFIG)``. See policy :policy:`CMP0084`. * Support for running CMake on Windows XP and Windows Vista has been dropped. The precompiled Windows binaries provided on ``cmake.org`` now require Windows 7 or higher. * CTest no longer supports submissions via ``ftp``, ``scp``, ``cp``, and ``xmlrpc``. CDash is the only maintained testing dashboard for CTest, and it only supports submissions over ``http`` and ``https``. Other Changes ============= * Object library linking has been fixed to propagate private link libraries of object libraries to consuming targets. * Install rules under :command:`add_subdirectory` now interleave with those in the calling directory. See policy :policy:`CMP0082` for details. * CMake now imposes a maximum recursion limit to prevent a stack overflow on scripts that recurse infinitely. The limit can be adjusted at runtime with :variable:`CMAKE_MAXIMUM_RECURSION_DEPTH`. * When using cppcheck via the :variable:`CMAKE__CPPCHECK` variable or :prop_tgt:`_CPPCHECK` property, the build will now fail if ``cppcheck`` returns non-zero as configured by its command-line options. * Required link options to manage Position Independent Executable are now added when :prop_tgt:`POSITION_INDEPENDENT_CODE` is set. The project is responsible for using the :module:`CheckPIESupported` module to check for ``PIE`` support to ensure that the :prop_tgt:`POSITION_INDEPENDENT_CODE` target property will be honored at link time for executables. This behavior is controlled by policy :policy:`CMP0083`. * :ref:`Visual Studio Generators` for VS 2010 and above learned to support the ``VS_DEBUGGER_*`` properties on targets created via :command:`add_custom_target`. * The :module:`CPack` module no longer defaults to the ``paxr`` value in the :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` variable, because ``dpkg`` has never supported the PAX tar format. The ``paxr`` value will be mapped to ``gnutar`` and a deprecation message emitted. * CMake no longer issues a warning if a target listed in an :command:`install(TARGETS)` command has its :prop_tgt:`EXCLUDE_FROM_ALL` property set to true. Updates ======= Changes made since CMake 3.14.0 include the following. 3.14.1 ------ * The :module:`FindFontconfig` module added by 3.14.0 accidentally used uppercase ``FONTCONFIG_*`` variable names that do not match our conventions. 3.14.1 revises the module to use ``Fontconfig_*`` variable names. This is incompatible with 3.14.0 but since the module is new in the 3.14 series usage should not yet be widespread. 3.14.3 ------ * The :variable:`CMAKE_VS_PLATFORM_NAME_DEFAULT` variable was added to help toolchain files work with the :generator:`Visual Studio 16 2019` generator where the default platform now depends on the host platform. 3.14.4 ------ * In CMake 3.14.0 through 3.14.3, calling :command:`target_link_libraries` to add ``PRIVATE`` dependencies to a static library created in another directory (under policy :policy:`CMP0079` ``NEW`` behavior) would incorrectly propagate usage requirements of those dependencies to dependents that link the static library. This has been fixed. The bug also existed in 3.13.0 through 3.13.4 and is fixed in 3.13.5. 3.14.5 ------ * Entries of the ``CPATH`` environment variable are no longer excluded from explicit use via :command:`include_directories` and :command:`target_include_directories` as they were in CMake 3.14.0 through 3.14.4. 3.14.6 ------ * In CMake 3.14.0 through 3.14.5, the :module:`FindBISON` module policy :policy:`CMP0088` ``NEW`` behavior accidentally interpreted a relative path to the ``.y`` input as relative to the build tree directory instead of the source tree directory. This has been fixed. 3.14.7 ------ * In CMake 3.14.0 through 3.14.6, the :prop_dir:`EXCLUDE_FROM_ALL` directory property was regressed from pre-3.14 behavior and caused targets within the directory to be excluded even from its own "all". This has been fixed. PK! wJWAWA3.19.rstnu[CMake 3.19 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.18 include the following. New Features ============ Presets ------- * :manual:`cmake(1)` and :manual:`cmake-gui(1)` now recognize ``CMakePresets.json`` and ``CMakeUserPresets.json`` files (see :manual:`cmake-presets(7)`). Generators ---------- * The :generator:`Xcode` generator now uses the Xcode "new build system" when generating for Xcode 12.0 or higher. See the :variable:`CMAKE_XCODE_BUILD_SYSTEM` variable. One may use ``-T buildsystem=1`` to switch to the legacy build system. * The :generator:`Xcode` generator gained support for linking libraries and frameworks via the *Link Binaries With Libraries* build phase instead of always by embedding linker flags directly. This behavior is controlled by a new :prop_tgt:`XCODE_LINK_BUILD_PHASE_MODE` target property, which is initialized by a new :variable:`CMAKE_XCODE_LINK_BUILD_PHASE_MODE` variable. * The :ref:`Visual Studio Generators` for VS 2015 and above gained support for the Visual Studio Tools for Android. One may now set :variable:`CMAKE_SYSTEM_NAME` to ``Android`` to generate ``.vcxproj`` files for the Android tools. Languages --------- * CMake learned to support ``ISPC`` as a first-class language that can be enabled via the :command:`project` and :command:`enable_language` commands. ``ISPC`` is currently supported by the :ref:`Makefile Generators` and the :generator:`Ninja` generator on Linux, macOS, and Windows using the Intel ISPC compiler. * ``CUDA`` language support for Clang now includes: - separable compilation (:prop_tgt:`CUDA_SEPARABLE_COMPILATION`), and - finding scattered toolkit installations when cross-compiling. * ``CUDA`` language support now works on QNX. Platforms --------- * Apple Silicon is now supported (since CMake 3.19.2): * The :variable:`CMAKE_HOST_SYSTEM_PROCESSOR` is selected using ``uname -m``. Since this may vary based on CMake's own architecture and that of the invoking process tree, the :variable:`CMAKE_APPLE_SILICON_PROCESSOR` variable or :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable may be set to specify a host architecture explicitly. * If :variable:`CMAKE_OSX_ARCHITECTURES` is not set, CMake adds explicit flags to tell the compiler to build for the :variable:`CMAKE_HOST_SYSTEM_PROCESSOR` so the toolchain does not have to guess based on the process tree's architecture. File-Based API -------------- * The :manual:`cmake-file-api(7)` "codemodel" version 2 ``version`` field has been updated to 2.2. * The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object gained a new ``languageStandard`` field in the ``compileGroups`` objects. Command-Line ------------ * The :manual:`cmake(1)` command-line tool's ``--install`` mode gained a ``--default-directory-permissions`` option. * :manual:`cmake(1)` gained a ``-E create_hardlink`` command-line tool that can be used to create hardlinks between files. GUI --- * The :manual:`CMake GUI ` now has an environment variable editor. Commands -------- * The :command:`add_test` command now (officially) supports whitespace and other special characters in the name for the test it creates. See policy :policy:`CMP0110`. * The :command:`cmake_language` command gained a ``DEFER`` mode to schedule command calls to occur at the end of processing a directory. * The :command:`configure_file` command gained a ``NO_SOURCE_PERMISSIONS`` option to suppress copying the input file's permissions to the output file. * The :command:`execute_process` command gained a ``COMMAND_ERROR_IS_FATAL`` option to specify a fatal error. * The :command:`file(ARCHIVE_CREATE)` command gained a ``COMPRESSION_LEVEL`` option to specify the compression level. * The :command:`file(CHMOD)` and :command:`file(CHMOD_RECURSE)` subcommands were added to set permissions of files and directories. * The :command:`file(DOWNLOAD)` command ```` argument is now optional. If it is not specified, the file is not saved. * The :command:`file(GENERATE)` command gained a new ``TARGET`` keyword to support resolving target-dependent generator expressions. * The :command:`file` command gained a new ``REAL_PATH`` sub-command to compute a path with symlinks resolved. * The :command:`find_package` command learned to handle a version range. * The :command:`separate_arguments` command gained a new ``PROGRAM`` option. It allows the arguments to be treated as a program invocation and will resolve the executable to a full path if it can be found. * The ``DIRECTORY`` option of the :command:`set_property`, :command:`get_property`, and :command:`get_directory_property` commands now accepts references to binary directory paths, such as the value of :variable:`CMAKE_CURRENT_BINARY_DIR`. * The :command:`string` command gained a set of new ``JSON`` sub commands that provide JSON parsing capabilities. Variables --------- * The :variable:`CMAKE_CLANG_VFS_OVERLAY` variable was added to tell Clang to use a VFS overlay to support the Windows SDK when cross-compiling from hosts with case-sensitive filesystems. * The :variable:`CMAKE_MFC_FLAG` variable now supports generator expressions. * The :variable:`CMAKE_OPTIMIZE_DEPENDENCIES` variable was added to initialize the new :prop_tgt:`OPTIMIZE_DEPENDENCIES` target property and avoid unnecessarily building dependencies for a static library. * The :variable:`CMAKE_PCH_INSTANTIATE_TEMPLATES` variable was added to initialize the new :prop_tgt:`PCH_INSTANTIATE_TEMPLATES` target property. * The :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM` variable was added to tell the :ref:`Visual Studio Generators` what maximum version of the Windows SDK to choose. Properties ---------- * The :prop_tgt:`EXCLUDE_FROM_ALL` target property now supports :manual:`generator expressions `. * The :prop_tgt:`OPTIMIZE_DEPENDENCIES` target property was added to avoid unnecessarily building dependencies for a static library. * The :prop_tgt:`PCH_INSTANTIATE_TEMPLATES` target property was added to enable template instantiation in the precompiled header. This is enabled by default and may significantly improve compile times. Currently only supported for Clang (version 11 or later). * The :prop_tgt:`WIN32_EXECUTABLE` target property now supports :manual:`generator expressions `. Modules ------- * The :module:`CheckCompilerFlag` module has been added to generalize :module:`CheckCCompilerFlag` and :module:`CheckCXXCompilerFlag` to more languages. It also supports the ``CUDA`` and ``ISPC`` languages. * The :module:`CheckLinkerFlag` module now supports the ``CUDA`` language. * The :module:`CheckSourceCompiles` module has been added to generalize :module:`CheckCSourceCompiles` and :module:`CheckCXXSourceCompiles` to more languages. It also supports the ``CUDA`` and ``ISPC`` languages. * The :module:`CheckSourceRuns` module has been added to generalize :module:`CheckCSourceRuns` and :module:`CheckCXXSourceRuns` to more languages. It also supports the ``CUDA`` language. * The :module:`CMakePackageConfigHelpers` module gained support for version ranges. * The :module:`FindCUDAToolkit` module gained support for finding CUDA toolkits that do not contain ``nvcc``, as well as for finding scattered toolkit installations when cross-compiling. * The :module:`FindPackageHandleStandardArgs` module learned to handle version ranges. It also gained the ``find_package_check_version()`` command to check the validity of a version against version-related arguments of :command:`find_package` command. * The :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython` modules gained the ability to handle a version range. * The :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython` modules provide, respectively, the variable ``Python3_LINK_OPTIONS``, ``Python2_LINK_OPTIONS`` and ``Python_LINK_OPTIONS`` for link options. * The :module:`FindSDL` module now provides: * An imported target ``SDL::SDL``. * Result variables ``SDL_LIBRARIES`` and ``SDL_INCLUDE_DIRS``. * Version variables ``SDL_VERSION``, ``SDL_VERSION_MAJOR``, ``SDL_VERSION_MINOR``, and ``SDL_VERSION_PATCH``. * The :module:`FindSWIG` module gained the ability to handle a version range. * The :module:`FindTIFF` module gained a ``CXX`` component to find the ``tiffxx`` library containing C++ bindings. * The :module:`FindVulkan` module now provides a ``Vulkan::glslc`` imported target and associated ``Vulkan_GLSLC_EXECUTABLE`` variable which contain the path to the GLSL SPIR-V compiler. * The :module:`UseSWIG` module gained support for new source file properties ``OUTPUT_DIR`` and ``OUTFILE_DIR`` to manage output directories on a per-source basis. CTest ----- * :manual:`ctest(1)` now supports the CUDA ``compute-sanitizer`` checker (previously known as ``cuda-memcheck``) as the ``CTEST_MEMORYCHECK_COMMAND``. The different tools (``memcheck``, ``racecheck``, ``synccheck`` and ``initcheck``) supported by ``compute-sanitizer`` can be selected by adding appropriate flags to the ``CTEST_MEMORYCHECK_COMMAND_OPTIONS`` variable. The default flags are ``--tool memcheck --leak-check full``. CPack ----- * CPack gained the :variable:`CPACK_PRE_BUILD_SCRIPTS`, :variable:`CPACK_POST_BUILD_SCRIPTS`, and :variable:`CPACK_PACKAGE_FILES` variables. * The :cpack_gen:`CPack External Generator` gained the :variable:`CPACK_EXTERNAL_BUILT_PACKAGES` variable. * The :cpack_gen:`CPack WIX Generator` gained a :variable:`CPACK_WIX_CUSTOM_XMLNS` option to specify custom XML namespaces. Other ----- * :ref:`Interface Libraries` may now have source files added via :command:`add_library` or :command:`target_sources`. Those with sources will be generated as part of the build system. Deprecated and Removed Features =============================== * Compatibility with versions of CMake older than 2.8.12 is now deprecated and will be removed from a future version. Calls to :command:`cmake_minimum_required` or :command:`cmake_policy` that set the policy version to an older value now issue a deprecation diagnostic. * An explicit deprecation diagnostic was added for policy ``CMP0071`` (``CMP0071`` and below were already deprecated). The :manual:`cmake-policies(7)` manual explains that the OLD behaviors of all policies are deprecated and that projects should port to the NEW behaviors. * macOS SDKs older than 10.5 are no longer supported. * :manual:`cmake-gui(1)` now requires Qt5. Support for compiling with Qt4 has been removed. * The :manual:`cmake(1)` command-line option ``--warn-unused-vars`` has been removed and is now silently ignored. The option has not worked correctly since CMake 3.3. Documentation ============= The following guides have been added: * :guide:`IDE Integration Guide` * :guide:`Importing and Exporting Guide` Other Changes ============= * Building for macOS will now use the latest SDK available on the system, unless the user has explicitly chosen a SDK using :variable:`CMAKE_OSX_SYSROOT`. The deployment target or system macOS version will not affect the choice of SDK. * The :variable:`CMAKE__COMPILER` variable may now be used to store "mandatory" compiler flags like the :envvar:`CC` and other environment variables. * The :variable:`CMAKE__FLAGS_INIT` variable will now be considered during the compiler identification check if other sources like :variable:`CMAKE__FLAGS` or :envvar:`CFLAGS` are not set. * The :command:`find_program` command now requires permission to execute but not to read the file found. See policy :policy:`CMP0109`. * An imported target missing its location property fails during generation if the location is used. See policy :policy:`CMP0111`. * The following target-based generator expressions that query for directory or file name components no longer add a dependency on the evaluated target. See policy :policy:`CMP0112`. - ``TARGET_FILE_DIR`` - ``TARGET_LINKER_FILE_BASE_NAME`` - ``TARGET_LINKER_FILE_NAME`` - ``TARGET_LINKER_FILE_DIR`` - ``TARGET_SONAME_FILE_NAME`` - ``TARGET_SONAME_FILE_DIR`` - ``TARGET_PDB_FILE_NAME`` - ``TARGET_PDB_FILE_DIR`` - ``TARGET_BUNDLE_DIR`` - ``TARGET_BUNDLE_CONTENT_DIR`` * :ref:`Makefile Generators` no longer repeat custom commands from target dependencies. See policy :policy:`CMP0113`. * The :module:`ExternalProject` module handling of step target dependencies has been revised. See policy :policy:`CMP0114`. * The :prop_tgt:`OSX_ARCHITECTURES` target property is now respected for the ``ASM`` language. * If ``CUDA`` compiler detection fails with user-specified :variable:`CMAKE_CUDA_ARCHITECTURES` or :variable:`CMAKE_CUDA_HOST_COMPILER`, an error is raised. Updates ======= Changes made since CMake 3.19.0 include the following. 3.19.1 ------ * CMake 3.19.0 compiles source files with the :prop_sf:`LANGUAGE` property by passing an explicit language flag such as ``-x c``. This is consistent with the property's documented meaning that the source file is written in the specified language. However, it can break projects that were using the property only to cause the specified language's compiler to be used. This has been reverted to restore behavior from CMake 3.18 and below. * CUDA 11.1 support for Clang. 3.19.2 ------ * The precompiled macOS binary provided on ``cmake.org`` is now a universal binary with ``x86_64`` and ``arm64`` architectures. It requires macOS 10.10 or newer. The package file naming pattern has been changed from ``cmake-$ver-Darwin-x86_64`` to ``cmake-$ver-macos-universal``. * Apple Silicon host architecture selection support was updated. CMake 3.19.0 and 3.19.1 always chose ``arm64`` as the host architecture. CMake 3.19.2 returns to using ``uname -m`` as CMake 3.18 and below did. Since this may vary based on CMake's own architecture and that of the invoking process tree, the :variable:`CMAKE_APPLE_SILICON_PROCESSOR` variable or :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable may be set to specify a host architecture explicitly. * The :variable:`CMAKE_ISPC_HEADER_SUFFIX` variable and corresponding :prop_tgt:`ISPC_HEADER_SUFFIX` target property were added to control the header suffix used by ``ISPC`` compiler generated headers. 3.19.3 ------ * A precompiled Linux ``aarch64`` binary is now provided on ``cmake.org``. * Two precompiled macOS binaries are now provided on ``cmake.org``: * The naming pattern ``cmake-$ver-macos-universal`` is a universal binary with ``x86_64`` and ``arm64`` architectures. It requires macOS 10.13 or newer. * The naming pattern ``cmake-$ver-macos10.10-universal`` is a universal binary with ``x86_64`` and ``arm64`` architectures. It requires macOS 10.10 or newer. 3.19.4 ------ * The :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM` variable introduced in 3.19.0 previously worked only with the :generator:`Visual Studio 14 2015` generator. It has now been fixed to work with :ref:`Visual Studio Generators` for later VS versions too. 3.19.5 ------ * When :prop_tgt:`IOS_INSTALL_COMBINED` is enabled and the :generator:`Xcode` generator is used, it is now possible to initiate an install or package creation by running ``cmake --install`` or ``cpack`` from the command line. When using the Xcode new build system, these are the only supported methods due to a limitation of Xcode. Initiating these operations by building the ``install`` or ``package`` targets in Xcode is only supported when using the legacy build system. * The framework handling introduced in 3.19.0 as part of supporting Xcode's *Link Binaries With Libraries* build phase broke the ability to switch between device and simulator builds without reconfiguring. That capability has now been restored. 3.19.6 ------ * The :manual:`cmake-presets(7)` feature no longer allows comments in ``CMakePresets.json`` or ``CMakeUserPresets.json`` files. This was mistakenly allowed by the implementation in CMake 3.19.0 through CMake 3.19.5, and was not documented. 3.19.7 ------ * With :ref:`Visual Studio Generators` for VS 2017 and higher, the :variable:`CMAKE_GENERATOR_TOOLSET` field ``version=`` now accepts three-component MSVC toolset versions such as ``14.28.29910``. See the :variable:`CMAKE_VS_PLATFORM_TOOLSET_VERSION` variable. PK!y"))3.4.rstnu[CMake 3.4 Release Notes *********************** .. only:: html .. contents:: 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 `. * The :command:`install(FILES)` command ``DESTINATION`` option learned to support :manual:`generator expressions `. * 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__COMPILER_LAUNCHER` variable and :prop_tgt:`_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 additional 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 `. * 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 `. * 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 ``$`` :manual:`generator expression ` 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 :cpack_gen:`CPack DEB Generator` learned to set package dependencies per component. See variables: * :variable:`CPACK_DEBIAN__PACKAGE_BREAKS` * :variable:`CPACK_DEBIAN__PACKAGE_CONFLICTS` * :variable:`CPACK_DEBIAN__PACKAGE_ENHANCES` * :variable:`CPACK_DEBIAN__PACKAGE_PREDEPENDS` * :variable:`CPACK_DEBIAN__PACKAGE_PROVIDES` * :variable:`CPACK_DEBIAN__PACKAGE_RECOMMENDS` * :variable:`CPACK_DEBIAN__PACKAGE_REPLACES` * :variable:`CPACK_DEBIAN__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 ` 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 :variable:`compiler id _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 :cpack_gen:`CPack DEB Generator` now correctly excludes symlinks during package checksum calculation. * The :cpack_gen:`CPack DEB Generator` 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__COMPILE_OBJECT` rule variable now substitutes compiler include flags in a separate ```` placeholder instead of the main ```` placeholder. PK!>[H.H.3.12.rstnu[CMake 3.12 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.11 include the following. New Features ============ Generators ---------- * The :ref:`Visual Studio Generators` for VS 2017 learned to support a ``version=14.##`` option in the :variable:`CMAKE_GENERATOR_TOOLSET` value (e.g. via the :manual:`cmake(1)` ``-T`` option) to specify a toolset version number. Command-Line ------------ * The :manual:`cmake(1)` :ref:`Build Tool Mode` (``cmake --build``) gained ``--parallel []`` and ``-j []`` options to specify a parallel build level. They map to corresponding options of the native build tool. Commands -------- * The :command:`add_compile_definitions` command was added to set preprocessor definitions at directory level. This supersedes :command:`add_definitions`. * The :command:`cmake_minimum_required` and :command:`cmake_policy(VERSION)` commands now accept a version range using the form ``[...]``. The ```` version is required but policies are set based on the older of the running CMake version and the version specified by ````. This allows projects to specify a range of versions for which they have been updated and avoid explicit policy settings. * The :command:`file(GLOB)` and :command:`file(GLOB_RECURSE)` commands learned a new flag ``CONFIGURE_DEPENDS`` which enables expression of build system dependency on globbed directory's contents. * The :command:`file(TOUCH)` and :command:`file(TOUCH_NOCREATE)` commands were added to expose ``TOUCH`` functionality without having to use CMake's command-line tool mode with :command:`execute_process`. * The :command:`find_package` command now searches prefixes specified by the :variable:`_ROOT` CMake variable and the :envvar:`_ROOT` 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 :policy:`CMP0074`. * The :command:`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 :command:`list` command learned a ``JOIN`` sub-command to concatenate list's elements separated by a glue string. * The :command:`list` command learned a ``SUBLIST`` sub-command to get a sublist of the list. * The :command:`list` command learned a ``TRANSFORM`` sub-command to apply various string transformation to list's elements. * The :command:`project` command learned an optional ``HOMEPAGE_URL`` parameter which has the effect of setting variables like :variable:`PROJECT_HOMEPAGE_URL`, :variable:`_HOMEPAGE_URL` and :variable:`CMAKE_PROJECT_HOMEPAGE_URL`. * The :command:`string` command learned a ``JOIN`` sub-command to concatenate input strings separated by a glue string. * :command:`target_compile_options` and :command:`add_compile_options` commands gained a ``SHELL:`` prefix to specify a group of related options using shell-like quoting. * The :command:`target_link_libraries` command now supports :ref:`Object Libraries`. Linking to an object library uses its object files in direct dependents and also propagates usage requirements. Variables --------- * The :variable:`CMAKE_FOLDER` variable was added to initialize the :prop_tgt:`FOLDER` property on all targets. * The :variable:`CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION` variable was defined to initialize all :prop_tgt:`DOTNET_TARGET_FRAMEWORK_VERSION` target properties. * ``CMAKE_PROJECT_VERSION*`` variables have been introduced: - :variable:`CMAKE_PROJECT_VERSION` - :variable:`CMAKE_PROJECT_VERSION_MAJOR` - :variable:`CMAKE_PROJECT_VERSION_MINOR` - :variable:`CMAKE_PROJECT_VERSION_PATCH` - :variable:`CMAKE_PROJECT_VERSION_TWEAK` * The :variable:`CMAKE_SUPPRESS_REGENERATION` variable was extended to support the :generator:`Ninja` and :ref:`Makefile Generators`. It is also now documented. * ``CMAKE_VS_SDK_*_DIRECTORIES`` variables were defined to tell :ref:`Visual Studio Generators` for VS 2010 and above how to populate fields in ``.vcxproj`` files that specify SDK directories. The variables are: - :variable:`CMAKE_VS_SDK_EXCLUDE_DIRECTORIES` - :variable:`CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES` - :variable:`CMAKE_VS_SDK_INCLUDE_DIRECTORIES` - :variable:`CMAKE_VS_SDK_LIBRARY_DIRECTORIES` - :variable:`CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES` - :variable:`CMAKE_VS_SDK_REFERENCE_DIRECTORIES` - :variable:`CMAKE_VS_SDK_SOURCE_DIRECTORIES` * A :variable:`MSVC_TOOLSET_VERSION` variable was added to provide the MSVC toolset version associated with the current MSVC compiler version in :variable:`MSVC_VERSION`. Properties ---------- * The :prop_tgt:`COMMON_LANGUAGE_RUNTIME` target property was introduced to configure the use of managed C++ for :ref:`Visual Studio Generators` for VS 2010 and above. A corresponding :prop_tgt:`IMPORTED_COMMON_LANGUAGE_RUNTIME` target property was added to support ``C++/CLI`` for imported targets. * The :prop_tgt:`DOTNET_TARGET_FRAMEWORK_VERSION` target property was introduced as replacement for :prop_tgt:`VS_DOTNET_TARGET_FRAMEWORK_VERSION`, which is considered deprecated now. * An :prop_tgt:`EXPORT_PROPERTIES` target property was added to specify a custom list of target properties to include in targets exported by the :command:`install(EXPORT)` and :command:`export` commands. * The :prop_tgt:`PDB_OUTPUT_DIRECTORY` property learned to support :manual:`generator expressions `. * A :prop_dir:`TESTS` directory property was added to hold the list of tests defined by the :command:`add_test` command. * A :prop_tgt:`VS_DEBUGGER_COMMAND` target property was created to set the debugging command line with :ref:`Visual Studio Generators` for VS 2010 and above. * HLSL source file properties :prop_sf:`VS_SHADER_DISABLE_OPTIMIZATIONS` and :prop_sf:`VS_SHADER_ENABLE_DEBUG` gained support for generator expressions. * HLSL source file property :prop_sf:`VS_SHADER_OBJECT_FILE_NAME` has been added to the :ref:`Visual Studio Generators` for VS 2010 and above. The property specifies the file name of the compiled shader object. Modules ------- * The :module:`FindALSA` module now provides imported targets. * The :module:`FindCURL` module now provides imported targets. * The :module:`FindJPEG` module now provides imported targets. * The :module:`FindLibXml2` module now provides imported targets. * The :module:`FindMatlab` module now supports the Matlab Runtime Compiler (MCR) for compiling and linking matlab extensions. * A :module:`FindODBC` module was added to find an Open Database Connectivity (ODBC) library. * The :module:`FindPkgConfig` module has learned to export the found libraries with full path for direct consumption with the :command:`target_link_libraries` command. * New :module:`FindPython3` and :module:`FindPython2` modules, as well as a new :module:`FindPython` module, have been added to provide a new way to locate python environments. * The :module:`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 :module:`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 :module:`UseSWIG` module learned to support CSHARP variant wrapper files. * The :module:`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 ``$`` and ``$`` :manual:`generator expression ` has been added to enable consumption of generator expressions whose evaluation results itself in generator expressions. * A new ``$`` :manual:`generator expression ` has been added. * A new ``$`` :manual:`generator expression ` has been added. * A new ``$`` :manual:`generator expression ` has been added. CTest ----- * The :command:`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 :prop_test:`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 :module:`CPack` module now uses variables :variable:`CMAKE_PROJECT_VERSION_MAJOR`, :variable:`CMAKE_PROJECT_VERSION_MINOR` and :variable:`CMAKE_PROJECT_VERSION_PATCH` to initialize corresponding CPack variables. * A :cpack_gen:`CPack NuGet Generator` was was added with basic support for `NuGet`_. .. _NuGet: https://docs.microsoft.com/en-us/nuget/what-is-nuget Other ----- * The :manual:`Compile Features ` functionality is now aware of C++ 20. No specific features are yet enumerated besides the ``cxx_std_20`` meta-feature. * The :manual:`Compile Features ` functionality is now aware of the availability of C features in MSVC since VS 2010. * The :manual:`Compile Features ` functionality is now aware of C language standards supported by Texas Instruments C compilers. Deprecated and Removed Features =============================== * The :generator:`Visual Studio 8 2005` generator has been removed. * CMake no longer produces ``_LIB_DEPENDS`` cache entries for library targets. See policy :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 :command:`install` documentation so that external packaging software can take advantage of CPack-style component installs. * The :module:`CheckIncludeFile` module ``check_include_file`` macro learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. See policy :policy:`CMP0075`. * The :module:`CheckIncludeFileCXX` module ``check_include_file_cxx`` macro learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. See policy :policy:`CMP0075`. * The :module:`CheckIncludeFiles` module ``check_include_files`` macro learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. See policy :policy:`CMP0075`. * The :manual:`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 :module:`UseSWIG` module :command:`swig_add_library` command (and legacy ``swig_add_module`` command) now set the prefix of Java modules to ``""`` for MINGW, MSYS, and CYGWIN environments. .. _`Fortran Submodules`: http://fortranwiki.org/fortran/show/Submodules PK!%bX7X73.17.rstnu[CMake 3.17 Release Notes ************************ .. only:: html .. contents:: Changes made since CMake 3.16 include the following. New Features ============ Generators ---------- * :manual:`cmake(1)` gained a :generator:`Ninja Multi-Config` generator, which is similar to the :generator:`Ninja` generator but can be used to build multiple configurations at once. * :ref:`Visual Studio Generators` learned to support per-config sources. Previously only :ref:`Command-Line Build Tool Generators` supported them. * :ref:`Visual Studio Generators` for VS 2010 and above now support specifying the ``VCTargetsPath`` value for project files in :variable:`CMAKE_GENERATOR_TOOLSET` setting. * :ref:`Visual Studio Generators` for VS 2010 and above learned to support .NET Standard and .NET Core. See the :prop_tgt:`DOTNET_TARGET_FRAMEWORK` target property and associated :variable:`CMAKE_DOTNET_TARGET_FRAMEWORK` variable. Languages --------- * The :manual:`Compile Features ` functionality now offers meta-features for the CUDA language standard levels (e.g. ``cuda_std_03``, ``cuda_std_14``). See :prop_gbl:`CMAKE_CUDA_KNOWN_FEATURES`. Compilers --------- * The IBM XL Fortran compiler is now supported by the :generator:`Ninja` generator. Command-Line ------------ * :manual:`cmake(1)` gained a ``--debug-find`` command-line option to enable additional human-readable output on where ``find_*`` commands search. * :manual:`cmake(1)` gained a ``--trace-format`` command-line option that can be used to set the ``--trace`` output format. Currently, the old human readable and the new JSON format are supported. The new JSON format is easier to parse automatically than the existing format. * :manual:`cmake(1)` gained a ``-E rm`` command-line tool that can be used to remove directories and files. This supersedes the existing ``-E remove`` and ``-E remove_directory`` tools and has better semantics. Commands -------- * The :command:`add_custom_command` command learned to interpret paths in ``DEPENDS`` arguments that are specified relative to the current binary directory. * The :command:`foreach` command learned a new ``ZIP_LISTS`` option to iterate over multiple lists simultaneously. * The :command:`load_cache(READ_WITH_PREFIX)` command mode is now allowed when using ``cmake -P`` to :ref:`Run a Script