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

[Bug] cmake workflow don't use the "targets" in buildpreset which i use in workflowpresets

Open Sdofsilence opened this issue 5 months ago • 2 comments

Brief Issue Summary

I use workflow to configure then build,i set the "targets" in the buildpreset,but plugin use target in sidebar i selected,i think it's not reasonaable,it should use the targets i set in the CMakePresets.json file.Or is this something you intentionally did?

CMake Tools Diagnostics

*

Debug Log

*

Additional Information

No response

Sdofsilence avatar Sep 26 '25 17:09 Sdofsilence

"buildPresets": [ { "name": "debug", "displayName": "Build Debug", "configurePreset": "linux-debug", "configuration": "Debug" }, { "name": "release", "displayName": "Build Release", "configurePreset": "linux-release", "configuration": "Release" }, { "name": "workflow-build", "displayName": "workflow-build", "configurePreset": "linux-debug", "configuration": "Debug", "targets": [ "client" ] } ], "workflowPresets": [ { "name": "workflow", "description": "workflow configure then build", "displayName": "workflow", "steps": [ { "type": "configure", "name": "linux-debug" }, { "type": "build", "name": "workflow-build" } ] } ]

Sdofsilence avatar Sep 26 '25 17:09 Sdofsilence

Hi @Sdofsilence , thanks for reporting issue here! We can reproduce this issue on VS Code 1.104.2 + CMake tools 1.22.11 version. Repro Steps:

  1. Download the attached project (Test4581.zip) and open it.
  2. On CMake pane, set "Workflow" to "workflow", set the build target to “all” or other targets, excluding the target defined in the workflow.
  3. Run Workflow and observe the result.

Details please see following video:

Image

FYI: @gcampbell-msft

yanghhhhhhh avatar Sep 29 '25 09:09 yanghhhhhhh