CMake 3.18.0-rc2 is ready for testing

I am proud to announce the second CMake 3.18 release candidate.

Documentation is available at:

Release notes appear below and are also published at

Some of the more significant changes in CMake 3.18 are:

  • The “CUDA” language can now be compiled using Clang on non-Windows platforms.
    Separable compilation is not yet supported on any platform.
    This is experimental and still under development.
  • “cmake(1)” gained support for profiling of CMake scripts through the
    parameters “–profiling-output” and “–profiling-format”.
  • The “add_library()” and “add_executable()” commands learned to
    create Alias Targets referencing non-“GLOBAL” Imported Targets.
  • The “cmake_language()” command was added for meta-operations on
    scripted or built-in commands, starting with a mode to “CALL” other
    commands, and “EVAL CODE” to inplace evaluate a CMake script.
  • The “file(CONFIGURE)” subcommand was created in order to replicate
    the “configure_file()” functionality without resorting to a pre-
    existing file on disk as input. The content is instead passed as a
  • The “find_program()”, “find_library()”, “find_path()” and
    “find_file()” commands gained a new “REQUIRED” option that will stop
    processing with an error message if nothing is found.
  • A “CMAKE_CUDA_ARCHITECTURES” variable was added to specify CUDA
    output architectures. Users are encouraged to use this instead of
    specifying options manually, as this approach is compiler-agnostic.
    The variable is initialized automatically when
    “CMAKE_CUDA_COMPILER_ID” is “NVIDIA”. The variable is used to
    initialize the new “CUDA_ARCHITECTURES” target property. See policy
  • The “UNITY_BUILD_MODE” target property was added to tell generators
    which algorithm (“BATCH”, “GROUP”) to use for grouping included source
  • The “CheckLinkerFlag” module has been added to provide a facility to
    check validity of link flags.
  • The “$<DEVICE_LINK:…>” and “$<HOST_LINK:…>” “generator
    expressions” were added to manage device and host link steps.
  • The “$<LINK_LANGUAGE:…>” and “$<LINK_LANG_AND_ID:…>” “generator expressions” were added.
  • “ctest(1)” gained a new “CTEST_RESOURCE_SPEC_FILE” variable, which
    can be used to specify a resource specification file.
  • “ccmake(1)” learned to read a “CCMAKE_COLORS” environment variable
    to customize colors.
  • On Windows, the “Ninja” and “Ninja Multi-Config” generators, when a
    compiler is not explicitly specified, now select the first compiler
    (of any name) found in directories listed by the “PATH” environment

Questions or comments are always welcome!