Configure vs build presets

I’m trying to express the difference between Configure and Build presets, other than the obvious fact that they are used at configuration and build time.

Is there a good explanation of this in the documentation?

Our typical workflow is:

cmake -G Ninja -D PROJECT_VARIANT= …/…
ninja -v

What is the syntax for replacing these commands with cmake commands that specify presets?

The first line would be a configure preset. You can specify "generator": "Ninja" and "cacheVariables": { "PROJECT_VARIANT": ".../..." }.

The second line would be a build preset. You can specify "verbose": true.