Release of CMake 3.16 build system

Submitted by release of a cross-platform open source build script generator CMake 3.16, which acts as an alternative to Autotools and is used in projects such as KDE, LLVM/Clang, MySQL, MariaDB, ReactOS, and Blender. The CMake code is written in C++ and distributed under the BSD license.

CMake is notable for providing a simple scripting language, means of extending functionality through modules, a minimum number of dependencies (no binding to M4, Perl or Python), caching support, cross-compilation tools, support for generating build files for a wide range of build systems and compilers, the presence ctest and cpack utilities to define test scripts and package builds, cmake-gui utility to interactively configure build options.

All improvements:

  • Added support for Objective C (“OBJC”) and Objective languages
    C++ ("OBJCXX"), which can be enabled via the project() and enable_language() commands, after which the code in the ".m" ".mm" files will compile as Objective C and Objective C++ code, rather than as C++, as it was before;

  • Added support for the Clang compiler on the Solaris platform;
  • Added new command line options: “cmake -E true|false” to print return codes 0 and 1; "cmake --trace-redirect=" to redirect trace information to a file instead
    "stderr"; the "cmake --loglevel" command has been renamed to "--log-level" to bring it into line with the names of the other commands;

  • Added the “target_precompile_headers()” command to list the list of header files used during precompilation (reduces build time);
  • Added the “UNITY_BUILD” property, which activates the batch mode for processing source files in generators to speed up the build;
  • Added commands “find_file()”, “find_library()”, “find_path()”,
    "find_package()" and "find_program()" to search for files, libraries, paths, packages and executables according to variables that define search paths for various categories of files.
    The variables "CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH", "CMAKE_FIND_USE_CMAKE_PATH", "CMAKE_FIND_USE_CMAKE_SYSTEM_PATH", "CMAKE_FIND_USE_PACKAGE_ROOT_PATH", "CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH" and "CMAKE_FIND_USE_PACKAGE_RE" are used to control the base search paths GISTRY";

  • Added the “file(GET_RUNTIME_DEPENDENCIES)” mode to the “file()” command, which allows you to recursively retrieve the list of libraries used when dynamically linking an executable file or library. The mode replaced the GetPrerequisites() command, which has now been deprecated;
  • The “ctest(1)” command implements the ability to serialize tests based on the resources required for each test;
  • The variable "CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY" has been deprecated and should be replaced by "CMAKE_FIND_USE_PACKAGE_REGISTRY";
  • Improved AIX platform support. When using the "ENABLE_EXPORTS" property, in addition to the executable file, an import file for the linker is now generated, saved with the ".imp" extension. In plugins created by calling "add_library()" with the "MODULE" option, this file can be used when linking using the "target_link_libraries()" command. Runtime linking on AIX is disabled by default because CMake now provides all the necessary symbol information for linking at load time. To use runtime linking of dynamic libraries or loadable modules, you must explicitly specify the options “-Wl, -G” in the lists of linker startup flags, defined through the variables “CMAKE_SHARED_LINKER_FLAGS” and “CMAKE_MODULE_LINKER_FLAGS”.

Source: opennet.ru

Add a comment