Using CMake presets
While building software on a multitude of configurations, compilers, and platforms is CMake’s greatest strength, it is also one of its greatest weaknesses as this often makes it hard for a programmer to figure out the build setups that are actually tested and working for a given piece of software. Since version 3.19, CMake has had a feature called presets. This feature is a great tool to handle these scenarios in a reliable and convenient way. Before presets, developers had to rely on documentation and fuzzy conventions to figure out the preferred configuration of a CMake project. Presets can specify the build directory, generators, target architecture, host toolchain, cache variables, and environment variables to use with a project. Since CMake 3.19, presets have evolved quite a bit with the addition of build, test, and package presets, as well as the latest addition: workflow presets.
For using presets, the top directory of a project must contain a file...