# Improvements to the cache editor

**URL:** https://discourse.cmake.org/t/improvements-to-the-cache-editor/6133
**Category:** Development
**Created:** [July 23, 2022, 1:26am UTC](https://discourse.cmake.org/t/improvements-to-the-cache-editor/6133 "2022-07-23T01:26:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [July 23, 2022, 1:26am UTC](https://discourse.cmake.org/t/improvements-to-the-cache-editor/6133/1 "2022-07-23T01:26:12Z")

</div>

I’ve got a few suggestions for improvements to the GUI cache editor, which I thought I’d post here for discussion rather than on the issue tracker, since these are more exploratory suggestions than hard feature requests.

**1. Allow setting descriptions on groups**  
Currently, the cache editor groups cache variables that start with the same `PREFIX_`. Individual cache variables can have a help string that is shown when hovering over one; I suggest allowing help/description strings to be set on groups of cache variables as well. The UX would be very similar to help strings for individual variables, displaying the string when hovering over a collapsed group.

**2. Allow setting entire groups as advanced**  
Within CMake code, only individual cache variables have an advanced/non-advanced state. I think it would be useful to be able to set an entire group of cache variables as advanced/non-advanced with a single command.

**3. Add a list cache type**  
Probably the largest proposed change. I propose adding a `LIST` type that can be specified in the `set(CACHE)` command. The reason to add a new cache type is that the GUI editor could have a user-friendly way to add/remove individual list items, without the user needing to work with the entire `;`-delimited string as a single text string.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 24, 2022, 9:59pm UTC](https://discourse.cmake.org/t/improvements-to-the-cache-editor/6133/2 "2022-07-24T21:59:03Z")

</div>

> [@benthevining](#):
>
> **Allow setting descriptions on groups**  
> Currently, the cache editor groups cache variables that start with the same `PREFIX_`. Individual cache variables can have a help string that is shown when hovering over one; I suggest allowing help/description strings to be set on groups of cache variables as well. The UX would be very similar to help strings for individual variables, displaying the string when hovering over a collapsed group.

I feel like explicit groups would work better. Sometimes the prefixes contain `_` which collapses down in the editor.

> [@benthevining](#):
>
> I think it would be useful to be able to set an entire group of cache variables as advanced/non-advanced with a single command.

Again, explicit groups would work better here.

> [@benthevining](#):
>
> **Add a list cache type**  
> Probably the largest proposed change. I propose adding a `LIST` type that can be specified in the `set(CACHE)` command. The reason to add a new cache type is that the GUI editor could have a user-friendly way to add/remove individual list items, without the user needing to work with the entire `;`-delimited string as a single text string.

Agreed. Though I think `LIST(STRING)` and `LIST(FILEPATH)` might work better in the long run (`LIST(LIST(X))` being forbidden due to list nesting not really being a thing).

---

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [July 24, 2022, 11:15pm UTC](https://discourse.cmake.org/t/improvements-to-the-cache-editor/6133/3 "2022-07-24T23:15:58Z")

</div>

What do you mean by explicit groups? Like, a new command to explicitly add cache entires to a group?

---

<div class="post-metadata">

### Author: ![fenrir](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenrir/32/734_2.png) [@fenrir](https://discourse.cmake.org/u/fenrir)
#### Post date: [July 25, 2022, 6:05am UTC](https://discourse.cmake.org/t/improvements-to-the-cache-editor/6133/4 "2022-07-25T06:05:17Z")

</div>

Probably not a new command, but rather a property on CACHE variables.  
Something like:  
`set_property(CACHE Trololo PROPERTY EDITOR_GROUP Gugus)`
