QtCreator: Support for custom entries in CMAKE_CONFIGURATION_TYPES
-
Re: Qt Creator does not read build configurations
I'm using latest QtCreator (12.0.2) and cmake with presets. I'm on Windows with MSVC 2022 but that should not matter.
I would like to define custom entries in CMAKE_CONFIGURATION_TYPES like
ABCDin{ "version": 2, "configurePresets": [ { "name": "msvc", "generator": "Visual Studio 17 2022", "architecture": "x64", "binaryDir": "${sourceDir}/build/msvc", "cacheVariables": { "CMAKE_CONFIGURATION_TYPES": "Debug;Release;ABCD" } } ] }With a MWE CMakeLists.txt a la
cmake_minimum_required(VERSION 3.28) project(mytest CXX) add_executable(mytest main.cpp)and then loading that into QTCreator I get the
msvckit but only the Release and Debug variants are correctly added. The ABCD variant does not work.Is that supported? And if not, is there a workaround?
I would like to avoiding having too many kits and instead want to leverage the build variants.
-
C Christian Ehrlicher moved this topic from General and Desktop on
-
Re: Qt Creator does not read build configurations
I'm using latest QtCreator (12.0.2) and cmake with presets. I'm on Windows with MSVC 2022 but that should not matter.
I would like to define custom entries in CMAKE_CONFIGURATION_TYPES like
ABCDin{ "version": 2, "configurePresets": [ { "name": "msvc", "generator": "Visual Studio 17 2022", "architecture": "x64", "binaryDir": "${sourceDir}/build/msvc", "cacheVariables": { "CMAKE_CONFIGURATION_TYPES": "Debug;Release;ABCD" } } ] }With a MWE CMakeLists.txt a la
cmake_minimum_required(VERSION 3.28) project(mytest CXX) add_executable(mytest main.cpp)and then loading that into QTCreator I get the
msvckit but only the Release and Debug variants are correctly added. The ABCD variant does not work.Is that supported? And if not, is there a workaround?
I would like to avoiding having too many kits and instead want to leverage the build variants.
Please open a bug report.
Note that the number of build types will increase the generating time for all configurations. See https://gitlab.kitware.com/cmake/cmake/-/issues/25440 for more details.
Qt Creator 13 comes with a "Presets Kits" only configuration page.