CMake 3.12.0 is now available for download. The new release includes changes in generators, command lines, variables, modules and other updates.
Let’s have a look at major changes and new features in CMake 3.12.0
Here are the new features added in the latest release:
The Visual Studio Generators for VS 2017 now offers support for version=14.## option in the CMAKE_GENERATOR_TOOLSET value (e.g. via the cmake(1) -T option). This helps in specifying a toolset version number.
The cmake(1) Build Tool Mode (cmake –build) gained –parallel [
The add_compile_definitions() command is now added to set the preprocessor definitions at a directory level. This supersedes add_definitions(). Also, the cmake_minimum_required() and cmake_policy(VERSION) commands can now accept a version range using the form
The CMAKE_SUPPRESS_REGENERATION variable is extended and now provides support to the Ninja and Makefile Generators. The CMAKE_FOLDER variable has been added to initialize the FOLDER property on all targets.
VS_SHADER_DISABLE_OPTIMIZATIONS and VS_SHADER_ENABLE_DEBUG, which are the properties of HLSL source file now offer support for generator expressions. HLSL source file property VS_SHADER_OBJECT_FILE_NAME has been added to the Visual Studio Generators for VS 2010 and above. The property helps to specify the file name of the compiled shader object.
The FindALSA module is now capable of providing imported targets. The FindMatlab module offers support for the Matlab Runtime Compiler (MCR) for compiling and linking matlab extensions. The UseSWIG module has also gained support now for CSHARP variant wrapper files.
A new $
The Visual Studio 8 2005 generator has been deprecated. Fortran dependency scanning now provides support for dependencies implied by Fortran Submodules. The Compile Features functionality will now make use of C features in MSVC since VS 2010.
For more information on the latest updates and features, check out the official CMake 3.12.0 release notes.