'Task that calls another task in tasks.json
I have two tasks build all and C/C++: build in my tasks.json defined below. build all calls C/C++: build. I have launch.json that calls tasks:
{
"version": "0.2.0",
"configurations": [
{
//...
//"preLaunchTask": "C/C++: build"
"preLaunchTask": "build all"
//...
}
]
}
If task calls C/C++: build, everything goes fine. If task calls build all nothing is happening. Why build all not calls C/C++: build?
tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: build",
"command": "/usr/bin/g++",
"args": [
"-g",
"${workspaceFolder}/*.cpp",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/g++"
},
{
"label": "build all",
"dependsOn": [
"C/C++: build"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
