microsoft / microsoft/vscode-cmake-tools

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

Open
#3,432 3 comments 2 reactions 1 assignee Claimed by @andreeis View on GitHub
Feature: tasks
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.