-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Modern CMake for C++
By :

Stage-specific presets are simply presets that configure individual CMake stages: configure, build, test, package, and install. They allow for a granular and structured approach to defining build configurations. Here’s an overview of the common features shared across all preset stages, followed by an introduction to defining presets for individual stages.
There are three features that are used to configure presets regardless of the CMake stage. Namely, these are unique name fields, optional fields, and associations with configuration presets. The following sections will cover each, respectively.
Every preset must have a unique name field within its stage. Given that CMakeUserPresets.json
(if it exists) implicitly includes CMakePresets.json
(if it exists), both files share the namespace, preventing duplicate names across them. For example, you can’t have two package-stage...