microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.47k stars 452 forks source link

Use variant Variables not only in settings.json but also in tasks.json #3432

Open WAleemS opened 11 months ago

WAleemS commented 11 months ago

Brief Issue Summary

Using variables like ${variant:buildType} in settings.json works. For example: settings.json: ... , "cmake.buildDirectory": "${workspaceFolder}/cmake_build/${variant:Target}/${variant:buildType}/GCC_ARM", ... Using the same Variables in tasks.json does not get substituted: tasks.json: ... , { "label": "echo", "type": "shell", "command": "echo ${variant:Target}" }, ... Runnign task "echo" just prints ${variant:Target} without substituting the currently selected varaint buildType

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

snehara99 commented 11 months ago

@WAleemS thank you for bringing this to our attention. We'll add it to our backlog and work on it as soon as we have capacity.

LittleDeD commented 4 months ago

Hi! Any updates on this? My projects rely on multiple variants and a lot of tasks and it will save me a lot of time in writing and using the tasks.

v-frankwang commented 4 months ago

@LittleDeD Thank you very much for your reply, there's not much update about this issue yet, we'll get back to you as soon as possible if there's any subsequent update.