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:
{
"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:
{
"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:
I have no idea what’s the issue here