Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 10.0.0-beta2, Qt Creator 10.0.0-rc1
-
None
-
Rocky Linux 8
QtCreator 10 beta 2
CMake 3.25.2
-
40a22963b (10.0)
Description
If you add base preset like (CMakePresetsBase.json)
{
"version": 4,
"configurePresets": [
{
"name": "Linux-CPP-only-toolset-configure",
"hidden": true,
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build/${generator}/${presetName}",
"environment":
{ "PATH": "/opt/rh/gcc-toolset-11/root/usr/bin:$penv
",
"CXX": "g++",
"CC": "gcc"
}
}
]
}
And try to use as common include at different file:
{
"version": 4,
"include": [
"../../../../CMakePresetsBase.json"
],
"configurePresets": [
{
"inherits": "Linux-CPP-only-toolset-configure",
"name": "Release",
"displayName": "CPP-only-toolset-Release",
"cacheVariables":
,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"inherits": "Linux-CPP-only-toolset-configure",
"name": "Debug",
"displayName": "CPP-only-toolset-Debug",
"cacheVariables":
,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
}
]
}
At QtCreator You'll find unevaluated string as a binary directory.
Case of debug shows inheritance from another file (include)
Case of Release shows inheritance from the same file.
But command line calls of cmake work as expected.
cmake --preset=Release
cmake --build --preset=Release
Cmake documentation link
https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#macro-expansion
Attachments
Issue Links
- relates to
-
QTCREATORBUG-28894 CMakePresets.json : settings of presets are lost after inheritance from included file
- Closed
For Gerrit Dashboard: QTCREATORBUG-28893 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
466585,2 | CMakePM: Fix presets with macros in CMAKE_BUILD_TYPE | 10.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |