Summary
We have just completed a comprehensive overview of CMake presets, introduced in CMake 3.19, to streamline project management. Presets allow product authors to provide a neatly prepared experience for their users by configuring all the stages of the project build and delivery. Presets not only simplify the usage of CMake but also enhance consistency and allow environment-aware setups.
We explained the structure and usage of the CMakePresets.json
and CMakeUserPresets.json
files, providing insights into defining various types of presets, such as configure presets, build presets, test presets, package presets, and workflow presets. Each type is described in detail: we learned about common fields, how to structure presets internally, establish inheritance between them, and the specific configuration options available for the end user.
For the configure preset, we covered important topics like selecting the generator, build, and installation directory, and linking presets...