Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 14.0.1
-
None
Description
I have this CMakePresets.json:
{ "version": 5, "configurePresets": [ { "name": "User-MSVC-VS-2022-x64", "description": "TechnoTeam Ninja Multi-Config Build", "generator": "Ninja Multi-Config", "environment": { "TT_EXTERNAL_BASE_PATH": "C:/TechnoTeam/develop", "PATH": "C:/Windows;C:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0;$env{TT_EXTERNAL_BASE_PATH}/usr/opt/tools/bin;$env{TT_EXTERNAL_BASE_PATH}/usr/bin" }, "cmakeExecutable": "$env{TT_EXTERNAL_BASE_PATH}/usr/opt/tools/bin/cmake.exe", "toolchainFile": "${sourceDir}/CMake/toolchain/windows_msvc.cmake", "binaryDir": "${sourceParentDir}/${sourceDirName}Build", "cacheVariables": { "CMAKE_VS_VERSION_RANGE": "[17.0,18.0)", "CMAKE_CONFIGURATION_TYPES": "Debug;Release" }, "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" } } ], "buildPresets": [ { "name": "Debug-User-MSVC-VS-2022-x64", "displayName": "Debug", "configurePreset": "User-MSVC-VS-2022-x64", "configuration": "Debug" }, { "name": "Release-User-MSVC-VS-2022-x64", "displayName": "Release", "configurePreset": "User-MSVC-VS-2022-x64", "configuration": "Release" } ] }
QtCreator converts this into a kit when configuring the project.
The Build Configurations are converted to Build Steps. For Debug it enables the Debug and disables the Release build command. For Release is does the same, so it also builds Debug.
The expected behavior would be to enable Release and disable Debug build step in Release mode.
Of course it would be even better to not import the other build configuration at all as build step.
In the middle run QtCreator should implement a proper Multi-Config mode. Currently the configuration can be changed for Debug and Release which makes no sense for Multi Config, because there is only one common configuration for both.