I figured this would be better as a discource than an issue.
Why is the
generator property in the presets mandatory? This reduces the usability of presets and makes it difficult replace shell or other scripts to configure a project that does not care about which generator is in use, but still wants to have a set of common cache variables in.
Let’s assume that I have 10 CI workflows with 10 different build systems across 3 OS platforms. Now I either copy paste the preset that contains a bunch of cache variables for each CI workflow and make it more difficult if those variables need to be modified, or do the same but with
inherits and still get a lot of repetition, or create scripts to invoke CMake with just to pass those cache variables with automatic generator recognition.
If presets allowed leaving the
generator property out and instead CMake looked for a default one like it normally does, then a single preset could support any platform and those commonly used cache variables could be nicely bundled up in a preset.