Configure and build presets consistency

Hi there,

I’ve recently started experimenting with CMake Presets feature in 3.20 and got a little bit confused by the build presets implementation. As an example, with a preset I can configure the project straight from its sources root like

cmake --preset MyPreset .

but I can’t build from the sources root, I have to navigate to binaryDir to invoke

cmake --build

I found an option to create a “fake” build preset which has only a link to configure preset, but do I understand correctly that it’s a designed use? Could there be an implicit build preset matching configure preset?

"buildPresets": [{
  "name": "default",
  "configurePreset": "default"
}]

Thanks,
Evgenii

You have to write something like this:

cmake --build --preset=my-build-preset