vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

[Feature] Add a command to set the build AND launch target.

Open MStachowicz opened this issue 6 months ago • 2 comments

Request Overview

In 99% of use cases I set my launch target and then have to update the build target to match manually.

On occasion I may set the build target to ALL but never do I want the build target to be anything other than ALL or the launch/debug target.

Would be sweet to have a status bar and or command palette option which would allow setting both simultaneously!

Alternatively, a setting which forces the build target to update when setting a launch target.

For reference, I use the dropdowns directly, I am open to solutions using the launch.json as a workaround, per #3517 these two workflows are still not particularly clear to me but if I can make the requested feature Build+Launch target setting work in one shortcut it would be fantastic.

Additional Information

No response

MStachowicz avatar May 22 '25 11:05 MStachowicz

There is an option I have found: cmake.buildBeforeRun

This takes me half way there, I now set a launch target which is guaranteed to be built when I launch. Problem is, I still have to set a build target, my workaround is to just set it to something that has a short build time since it will now default to building both.

MStachowicz avatar May 22 '25 15:05 MStachowicz