# cmake-gui blocks presets that are usable through command line cmake

**URL:** https://discourse.cmake.org/t/cmake-gui-blocks-presets-that-are-usable-through-command-line-cmake/9459
**Category:** Usage
**Tags:** os:linux, comp:gcc, gen:ninja
**Created:** [November 18, 2023, 6:28pm UTC](https://discourse.cmake.org/t/cmake-gui-blocks-presets-that-are-usable-through-command-line-cmake/9459 "2023-11-18T18:28:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AngelDev06](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angeldev06/32/3865_2.png) [@AngelDev06](https://discourse.cmake.org/u/AngelDev06)
#### Post date: [November 18, 2023, 6:28pm UTC](https://discourse.cmake.org/t/cmake-gui-blocks-presets-that-are-usable-through-command-line-cmake/9459/1 "2023-11-18T18:28:23Z")

</div>

I have an issue specifically with `cmake-gui`. I have written a `CMakePresets.json` file to build my project on linux however as stated in the title even though running `cmake --list-presets` on command line displays all presets that are available for use in the platform I have chosen, I am unable to select those presets on `cmake-gui` too. My CMakePresets.json` file has the following configure preset as base for linux:

```auto
{
  "name": "linux-base",
  "hidden": true,
  "binaryDir": "${sourceDir}/out/build/${presetName}",
  "installDir": "${sourceDir}/out/install/${presetName}",
  "cacheVariables": {
    "ALTERHOOK_TARGET_ARCH": "X86",
    "CMAKE_CXX_STANDARD": "20"
  },
  "condition": {
    "type": "equals",
    "lhs": "${hostSystemName}",
    "rhs": "Linux"
  }
}

```

And then a few presets that inherits from it like:

```auto
{
  "name": "linux-gcc-base",
  "hidden": true,
  "inherits": "linux-base",
  "cacheVariables": {
    "CMAKE_C_COMPILER": "gcc",
    "CMAKE_CXX_COMPILER": "g++"
  }
},
{
  "name": "linux-x64-debug",
  "displayName": "Linux x64 Debug",
  "inherits": "linux-gcc-base",
  "architecture": {
    "value": "x64",
    "strategy": "external"
  },
  "cacheVariables": {
    "CMAKE_BUILD_TYPE": "Debug"
  }
}

```

What matters on this (at least from what I can tell) is the condition specified on the base preset which enables it only if the host system is Linux.

Like I said on command line I get back all presets that are actually available including these ones and I have successfully built my project.

On cmake-gui however:  
 ![Screenshot 2023-11-18 202656](https://discourse.cmake.org/uploads/default/original/2X/e/e274e316164f3b4df0f8506920bfeff426a2eafd.png)

I have no idea what’s the issue here

---

<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: [November 19, 2023, 2:47am UTC](https://discourse.cmake.org/t/cmake-gui-blocks-presets-that-are-usable-through-command-line-cmake/9459/2 "2023-11-19T02:47:35Z")

</div>

Cc: @kyle.edwards

---

<div class="post-metadata">

### Author: ![Ravenwater](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ravenwater/32/5401_2.png) [@Ravenwater](https://discourse.cmake.org/u/Ravenwater)
#### Post date: [March 12, 2025, 2:38pm UTC](https://discourse.cmake.org/t/cmake-gui-blocks-presets-that-are-usable-through-command-line-cmake/9459/3 "2025-03-12T14:38:48Z")

</div>

I am encountering the same problem:

 ![image](https://discourse.cmake.org/uploads/default/original/2X/d/de8d7245b2f60244fc4c2788582f1193f36719ff.png)

Trying to retool our development processes around vcpkg, which relies on a CMAKE\_TOOLCHAIN\_FILE that is set via CMakePresets. If that isn’t supported with the current CMake workflows that include the GUI, need to know this sooner than later.
