`cmake --preset` without specifying preset could pick sane default
This is feature request.
I would like to use --preset
without actually specifying preset
$ cmake --preset ~/src/borg/ui/tui
Why?
- Because I believe (read: guess) that usually there exists a preset that covers ~90% of invocations.
- This slightly saves typing and memorizing preset name.
- This obviously hints new user that this preset is more important than others.
Why not?
- Arguably such preset should be already covered by default values of all options (doesn't apply to my project, I don't know / want to guess about others). BUT specifying a default preset in
CMakeUserPresets.json
with long list of non-default parameters is still usefull. - may be surprizing if after fetching changes from repo default preset changes (especially when selecting first preset as default)
How to choose a preset - idea 1:
- if it is specified on command line, obviously use it
cmake --preset=for_release ...
. Otherwise: - if .json files have preset called
default
use it. Otherwise: - pick first preset in
CMakeUserPresets.json
orCMakePresets.json
(in this order) If they are empty this is an error.
Above list with fallbacks seems good to me, but sticking with one (first seen vs named default) of the approaches would be good as well.
Different idea is to add key/value to json "default_preset": "ninja-multi",
. This lends itself well to overriding in CMakeUserPresets.json
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information