CMake 3.19.0-rc1 is ready for testing

I am proud to announce the first CMake 3.19 release candidate.
    https://cmake.org/download/

Documentation is available at:
    https://cmake.org/cmake/help/v3.19

Release notes appear below and are also published at
    https://cmake.org/cmake/help/v3.19/release/3.19.html

Some of the more significant changes in CMake 3.19 are:

  • “cmake(1)” and “cmake-gui(1)” now recognize “CMakePresets.json” and
    “CMakeUserPresets.json” files.
  • The “Xcode” generator now uses the Xcode “new build system” when
    generating for Xcode 12.0 or higher. See the
    “CMAKE_XCODE_BUILD_SYSTEM” variable. One may use “-T buildsystem=1”
    to switch to the legacy build system.
  • The Visual Studio Generators for VS 2015 and above gained support
    for the Visual Studio Tools for Android. One may now set
    “CMAKE_SYSTEM_NAME” to “Android” to generate “.vcxproj” files for
    the Android tools.
  • CMake learned to support “ISPC” as a first-class language that can
    be enabled via the “project()” and “enable_language()” commands.
    “ISPC” is currently supported by the Makefile Generators and the
    “Ninja” generator on Linux, macOS, and Windows using the Intel ISPC
    compiler.
  • “CUDA” language support for Clang now supports separable compilation
    (“CUDA_SEPARABLE_COMPILATION”)
  • The “CMake GUI” now has an environment variable editor.
  • The “cmake_path()” command was added for operations on filesystem
    paths.
  • The “file(GENERATE)” command gained a new “TARGET” keyword to
    support resolving target-dependent generator expressions.
  • The “CMAKE_OPTIMIZE_DEPENDENCIES” variable was added to initialize
    the new “OPTIMIZE_DEPENDENCIES” target property and avoid
    unnecessarily building dependencies for a static library.
  • The “CheckCompilerFlag” module has been added to generalize
    “CheckCCompilerFlag” and “CheckCXXCompilerFlag” to more languages.
    It also supports the “CUDA” and “ISPC” languages.
  • The “CheckSourceCompiles” module has been added to generalize
    “CheckCSourceCompiles” and “CheckCXXSourceCompiles” to more
    languages. It also supports the “CUDA” and “ISPC” languages.
  • The “CheckSourceRuns” module has been added to generalize
    “CheckCSourceRuns” and “CheckCXXSourceRuns” to more languages. It
    also supports the “CUDA” language.
  • The “FindCUDAToolkit” module gained support for finding CUDA
    toolkits that do not contain “nvcc”, as well as for finding
    scattered toolkit installations when cross-compiling.
  • Interface Libraries may now have source files added via
    “add_library()” or “target_sources()”. Those with sources will be
    generated as part of the build system.
  • Compatibility with versions of CMake older than 2.8.12 is now
    deprecated and will be removed from a future version. Calls to
    “cmake_minimum_required()” or “cmake_policy()” that set the policy
    version to an older value now issue a deprecation diagnostic.

One Response to CMake 3.19.0-rc1 is ready for testing

  1. Thomas Röfer says:

    Hi,

    I have a problem with the Xcode generator. It seems that .dylib-files that are listed as sources in add_executable() are automatically linked into the executable (which does not work, because their directories were not added to the library path). I my case, the libraries should not be linked at all, because they are Qt plugins that should just be copied into the application bundle. For that to happen, they have to be listed as sources.

    set(BUSH_PLUGIN_COCOA “${SIMROBOT_PREFIX}/Util/qt/macOS/plugins/platforms/libqcocoa.dylib”)
    set(BUSH_PLUGIN_MACSTYLE “${SIMROBOT_PREFIX}/Util/qt/macOS/plugins/styles/libqmacstyle.dylib”)

    set_source_files_properties(${BUSH_PLUGIN_COCOA} PROPERTIES MACOSX_PACKAGE_LOCATION PlugIns/platforms)
    set_source_files_properties(${BUSH_PLUGIN_MACSTYLE} PROPERTIES MACOSX_PACKAGE_LOCATION PlugIns/styles)

    add_executable(bush MACOSX_BUNDLE ${BUSH_SOURCES} “${BUSH_PLUGIN_COCOA}” “${BUSH_PLUGIN_MACSTYLE}”)

    This worked until CMake 3.18, but it fails with CMake 3.19.

    Best regards,

    Thomas

Questions or comments are always welcome!

X