CMake 3.28.0 – Cross-platform, Open-Source build system.
CMake is a family of tools designed to build, test, and package software. It is used to control the software compilation process using simple platform- and compiler-independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. It was created by Kitware in response to the need for a powerful, cross-platform build environment for Open-Source projects such as ITK and VTK.
CMake can handle in-place and out-of-place builds, enabling several builds from the same source tree, and cross-compilation. The ability to build a directory tree outside the source tree is a key feature, ensuring that if a build directory is removed, the source file remains unaffected. Another feature is the ability to generate a cache to be used with a graphical editor, which, when CMake is run, can locate executables, files, and libraries. This information goes into the cache, which can then be tailored before generating the native build files. Complicated directory hierarchies and applications that rely on several libraries are well supported by CMake. For instance, CMake is able to accommodate a project that has multiple toolkits, or libraries that each have multiple directories. In addition, CMake can work with projects that require executables to be created before generating code to be compiled for the final application. Its Open-Source, extensible design allows CMake to be adapted as necessary for specific projects.
It can generate makefiles for many platforms and IDEs including Unix, Windows, Mac OS X, OS/2, MSVC, Cygwin, MinGW, and Xcode. Projects which use CMake include Blender, Bullet physics engine, LLVM and Clang, MariaDB, MuseScore, MySQL, Qt5, Second Life, Stellarium, and SuperTux.
Some of the more significant changes in CMake 3.28 are:
C++ 20 named modules are now supported by Ninja Generators and Visual Studio Generators for VS 2022 and newer, in combination with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang 16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer. See “cmake-cxxmodules(7)” for details.
“HIP” language code may now be compiled for NVIDIA GPUs using the NVIDIA CUDA Compiler (NVCC). See the “CMAKE_HIP_PLATFORM” variable.
On Apple platforms, “.xcframework” folders are now supported.
The “exec_program()” command, which has been deprecated since CMake 3.0, has been removed by policy “CMP0153”. Use the “execute_process()” command instead.
Generated files, in targets using File Sets, are now considered private by default. Generated public headers must be specified using file sets. This allows Ninja Generators to produce more efficient build graphs. See policy “CMP0154”.
The “find_library()”, “find_path()”, and “find_file()” commands no longer search in installation prefixes derived from the “PATH” environment variable. This behavior was added in CMake 3.3 to support MSYS and MinGW (“MSYSTEM”) development environments on Windows, but it can search undesired prefixes that happen to be in the “PATH” for unrelated reasons. Users who keep some “<prefix>/bin” directories in the “PATH” just for their tools do not necessarily want any corresponding “<prefix>/lib” or “<prefix>/include” directories searched. The behavior was reverted for non-Windows platforms by CMake 3.6. Now it has been reverted on Windows platforms too.
More information here.