`cmake --preset ci`
is equivalent to
`cmake -B build -G Ninja -D CI_BUILD=ON`
Also remove build presets as they're not very useful without workflow
presets, which are only available in schema versions 6 and above.
Workflow presets allows combining configure, build, test and packaging
steps and makes it possible to run everything in a single command. So
cmake --preset iwyu
cmake --build --preset iwyu
instead becomes
cmake --workflow --preset iwyu
Workflow presets requires at least cmake version 3.25 to use.
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
This allows a more declarative way of defining targets which may be easier to those not familiar with cmake quirks.
Example usage:
# get a list of pre-configured presets
cmake --list-presets
# configure a preset
cmake . --preset=default
# build it
cmake --build --preset=default