Details
-
Suggestion
-
Resolution: Fixed
-
Not Evaluated
-
None
-
None
-
5a3d8b755 (17.0)
Description
A project I'm currently working on has a large number of presets, most of which are not typically used by developers. However, Qt Creator of course lists all of them when first configuring the project. I'd like to reduce the number of shown presets to make it easier for other developers to get an overview over typical build configurations as well as helping them find the preset(s) they're trying to build.
According to the documentation, Qt Creator sets the env variable QTC_RUN when executing cmake. My first attempt thus was to add a condition QTC_RUN != 1 to all those presets I didn't want to show up:
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 25,
"patch": 0
},
"configurePresets": [
{
"name": "test-qtc-run-condition",
"condition": {
"type": "notEquals",
"lhs": "$env{QTC_RUN}",
"rhs": "1"
}
}
]
}
However, Qt Creator doesn't seem to be setting this variable when evaluating CMake presets, so they still show up.
Attachments
For Gerrit Dashboard: QTCREATORBUG-33003 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
647894,2 | CMakePM: Allow QTC_RUN envvar query for CMake presets | 17.0 | qt-creator/qt-creator | Status: MERGED | +2 | +1 |