# Preset file grayed-out in the GUI

**URL:** https://discourse.cmake.org/t/preset-file-grayed-out-in-the-gui/5621
**Category:** Code
**Created:** [May 5, 2022, 6:43pm UTC](https://discourse.cmake.org/t/preset-file-grayed-out-in-the-gui/5621 "2022-05-05T18:43:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BillH](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@BillH](https://discourse.cmake.org/u/BillH)
#### Post date: [May 5, 2022, 6:43pm UTC](https://discourse.cmake.org/t/preset-file-grayed-out-in-the-gui/5621/1 "2022-05-05T18:43:44Z")

</div>

I’m using the json presets feature for the first time. I’m having a problem with the CMake GUI. When I start-up the GUI and aim it for my source directory, it finds the json file, but it appears grayed-out in the Presets selection box. What could be wrong?  
[CMakePresets.json](https://discourse.cmake.org/uploads/short-url/kKyB4Lt9M6kcZSejHmEERgQf6Hk.json) (999 Bytes)

---

<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: [May 5, 2022, 8:36pm UTC](https://discourse.cmake.org/t/preset-file-grayed-out-in-the-gui/5621/2 "2022-05-05T20:36:52Z")

</div>

@kyle.edwards

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [May 5, 2022, 10:06pm UTC](https://discourse.cmake.org/t/preset-file-grayed-out-in-the-gui/5621/3 "2022-05-05T22:06:06Z")

</div>

Possibly your presets file is malformed and fails to parse. You could verify that at the command line by trying to run `cmake --list-presets` from the top of your source tree. From a quick look at your presets file, I think your `generator` field is incorrect. The value is case-sensitive, so you probably wanted `Unix Makefiles` instead there.

---

<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: [May 5, 2022, 10:20pm UTC](https://discourse.cmake.org/t/preset-file-grayed-out-in-the-gui/5621/4 "2022-05-05T22:20:54Z")

</div>

The GUI should probably have a tooltip (at least) or some kind of notification that the preset is invalid (ideally with a useful error message).

---

<div class="post-metadata">

### Author: ![BillH](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@BillH](https://discourse.cmake.org/u/BillH)
#### Post date: [May 6, 2022, 12:55pm UTC](https://discourse.cmake.org/t/preset-file-grayed-out-in-the-gui/5621/5 "2022-05-06T12:55:02Z")

</div>

I had previously run cmake --list-presets and there were no problems. The solution was the second thing you mentioned: I had to change UNIX to Unix to solve the problem.

For completeness I want to also mention that for booleans that show as checkboxes in the GUI, the correct settings in json are true and false, which are case-sensitive, without quotes. After I made all of these changes, the file worked correctly.
