CMake 3.17.0 comes with a new Ninja script generator, improvements and more

The launch of the new version of the cross-platform open source script generator CMake 3.17In which developers have worked to add a new script generator called "Ninja Multi-Config", improvements to the Visual Studio script generator, general optimizations and more.

For those who do not know CMake, they should know that is a multiplatform code generation or automation tool which acts as an alternative to Autotools and is used in projects like KDE, LLVM / Clang, MySQL, MariaDB, ReactOS, and Blender.

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

This utility used to control the compilation process of the software using simple and platform independent configuration files. Generates native makefiles and workspaces that can be used in the desired development environment.

It is comparable to the GNU build system of Unix in which the process is controlled by configuration files, in the case of CMake called CMakeLists.txt.

What's new in CMake 3.17.0

As mentioned at the beginning, one of the main novelties that stand out in this new version of CMake 3.17.0 is the adding a new build script generator based on Ninja tools, which has the name of «Ninja Multi Config«, Which differs from the previous generator because this new generator provides the ability to process multiple build configurations at the same time.

Meanwhile, in the build script generator For Visual Studio, you can now define source files attached to each setting.

The ability to set metaparameters for CUDA ("Cuda_std_03", "cuda_std_14", etc.) has been added to tools to configure compiler functions (Compilation functions).

In addition to that, the ad mentions that variables were added «CMAKE_CUDA_RUNTIME_LIBRARY" Y "CUDA_RUNTIME_LIBRARY»To select the type of runtime libraries when using CUDA and also the« FindCUDAToolkit »module to determine the CUDA tools available on the system without including the CUDA language.

In CMake 3.17.0 the command «–Debug-find»Has been added to display additional readable diagnostics when searching. For similar purposes, the variable CMAKE_FIND_DEBUG_MODE.

Added support for finding CURL tools in the «FindCURL» module using the "CURLConfig.cmake" configuration files generated by cmake. To disable this behavior, the variable CURL_NO_CURL_CMAKE is provided.

The FindPython adds the ability to search for Python components in virtual environments controlled by «Conda«.

Added the option «–No-tests = [error | ignore]»To the ctest utility to determine behavior in the absence of evidence and "–repeat" to specify the conditions to restart the tests (until it passes, after the timeout).

Of the other changes that are mentioned in the announcement:

  • Build target properties INTERFACE_LINK_OPTIONS, INTERFACE_LINK_DIRECTORIES e INTERFACE_LINK_DEPENDS they were transferred between the internal dependencies of the statically assembled libraries.
  • When using the MinGW toolkit, the search for DLL files using the command find_library it is disabled by default (an attempt is made to import the ".dll.a" libraries instead).
  • The logic of choosing the ninja utility in the Ninja generator now does not depend on the executable file name - the first utility is used ninja-build, ninja o samu found, which is found in the paths defined through the PATH environment variable.
  • The command "-Erm»Has been added to the cmake utility, which can be used to remove files and directories instead of the separate commands«-E remove" Y "-E remove_directory«.

Finally if you want to know more about it, you can check the announcement of this new version in the following link


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.