You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used to select the build target from a list of targets after configuring the project when using cmake kits. When I moved from kits to presets, I noticed that a text prompt is shown when the "targets" field is not specified within the build preset. If there are too many available targets, adding them to all presets becomes a tedious task. Is there any ways to get the similar experience as using cmake kits before?
Edit: I've done more tests and finally found that this issue is unrelated to kits/presets. It occurs when the actual CMAKE_BUILD_TYPE doesn't match the build type you select before configuring the project. For example:
Using kits, leave the build type as "Unspecified", the actual CMAKE_BUILD_TYPE is Debug by default. -> Mismatch
Using kits, leave the build type as "Unspecified", set CMAKE_BUILD_TYPE to "Unspecified" in CMakeLists.txt. -> Match
Using kits, select the build type "Debug", set CMAKE_BUILD_TYPE in CMakeLists.txt to "DebuG" in CMakeLists.txt. -> Mismatch (case-sensitive)
Using presets without setting CMAKE_BUILD_TYPE, set CMAKE_BUILD_TYPE to "Debug" in CMakeLists.txt. -> Match (so we've found out that the default is "Debug" rather than "Unspecified" as is using kits)
Using presets with CMAKE_BUILD_TYPE=Debug, set CMAKE_BUILD_TYPE to "DebuG" in CMakeLists.txt. -> Mismatch (case-insensitive)
Besides, using non-standard build types is allowed. (Only for presets because afaik I cannot set the type to a custom type with kits).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I used to select the build target from a list of targets after configuring the project when using cmake kits. When I moved from kits to presets, I noticed that a text prompt is shown when the "targets" field is not specified within the build preset. If there are too many available targets, adding them to all presets becomes a tedious task. Is there any ways to get the similar experience as using cmake kits before?
Edit: I've done more tests and finally found that this issue is unrelated to kits/presets. It occurs when the actual CMAKE_BUILD_TYPE doesn't match the build type you select before configuring the project. For example:
Besides, using non-standard build types is allowed. (Only for presets because afaik I cannot set the type to a custom type with kits).
Beta Was this translation helpful? Give feedback.
All reactions