Release of build system CMake 4.0.0

The release of the cross-platform open-source build script generator CMake 4.0.0 has been announced, serving as an alternative to Autotools and used in projects like KDE, LLVM/Clang, MySQL, MariaDB, ReactOS, and Blender. The CMake code is written in C++ and is distributed under the BSD license.

CMake is notable for providing a straightforward scripting language, extending functionality through modules, supporting caching, offering tools for cross-compilation, generating build files for a wide array of build systems and compilers, and including ctest and cpack utilities for defining testing scripts and package builds, as well as the cmake-gui utility for interactive configuration of build parameters.

Key Changes:

  • Compatibility with CMake versions prior to 3.5 has been discontinued. An error will now be output when binding to unsupported versions in the cmake_minimum_required() and cmake_policy() functions.
  • An environment variable 'CMAKE_POLICY_VERSION_MINIMUM' has been added to override the minimum version of CMake required for building the project. This added variable allows avoiding changes to the calls to cmake_minimum_required(VERSION) and cmake_policy(VERSION) within the project itself, for example, to set version policies in projects that do not provide this capability.
  • The generator expression '$' now includes the 'NATIVE_PATH' operation for converting file paths from CMake representation (which uses '/' to separate directories) to system paths (using '/' in Unix-like systems and '\' in Windows).
  • On the macOS platform, when using build script generators based on the Ninja toolkit and Makefile generators, if a compiler is present in the '/usr/bin' directory, it will now be left unchanged, without binding to the compiler in Xcode. When building for macOS, the selection of SDK and passing the flag '-isysroot' to the compiler has been discontinued by default (the SDK is now selected by the compiler itself rather than CMake).
  • The property LINK_WARNING_AS_ERROR has been added, which treats linker warnings as errors. An option '—link-no-warning-as-error' has been added to the command line to disable the action of this property.
  • An option '—project-file' has been added to the cmake utility for specifying an alternative filename for CMakeLists.txt.
  • The CPack generator has been enhanced with the capability to create uncompressed tar archives.
  • Support for the prefix "LINKER:" has been added to the target_link_libraries() command and to the CMAKE_EXE_LINKER_FLAGS*, CMAKE_SHARED_LINKER_FLAGS*, and CMAKE_MODULE_LINKER_FLAGS* variables.
  • New variables added:
    • CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL,
    • CMAKE__LINK_MODE,
    • CMAKE__DEVICE_LINK_MODE,
    • CMAKE_LINK_WARNING_AS_ERROR,
    • CMAKE_MSVC_RUNTIME_CHECKS,
    • CMAKE_DEBUGGER_WORKING_DIRECTORY,
    • CMAKE_XCODE_SCHEME_LLDB_INIT_FILE,
    • CMAKE_XCODE_SCHEME_TEST_CONFIGURATION.
  • New properties added: DEBUGGER_WORKING_DIRECTORY and VS_SOLUTION_ITEMS (for attaching files to .sln for Visual Studio).
  • Ready CMake builds have been provided for SunOS for the sparc64 and x86_64 architectures.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster