Do CMake "interface"(?) presets exist?

Hi all, given a situation where a CMakePresets.json is distributed in a codebase, and users are expected to modify certain values in their own CMakeUserPresets.json, is there any way to suggests to an IDE (or even cmake --list-presets) that some presets aren’t really meant to be run without being built upon further.

For example:

$ cmake --list-presets
Available configure presets:

  "user_debug"
  "user_release"
  "root_config" (Interface)
  "debug_base" (Interface)
  "release_base" (Interface)

Would indicate that really "user_debug" and "user_release" are the only presets with any expectation of actually configuring/building successfully. IDE’s could then also use this to hide interface ones, or perhaps just prevent them from being defaulted to or something.

Anyway, does anything like this exist? If not, does anyone have any ideas on whether this could/should be suggested as a feature?

@kyle.edwards

Add "hidden": true to the preset to prevent it from showing in the presets listed by IDEs or the cmake --list-presets command.

1 Like

I cannot believe I missed this, it’s listed second on the docs! Thanks Craig!