VS代码:在工作区中批量构建所有task.json

时间:2018-11-14 20:46:09

标签: visual-studio-code

我现在使用Visual Studio代码(C / C ++),拥有一个包含多个项目的工作区。我正在寻找一种批处理构建所有task.json的方法。有没有办法做到这一点?还是有一个命令行来执行task.json?

这是我的一项task.json的基本示例:

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "build ConsoleTest",
        "type": "shell",
        "command": "g++",
        "problemMatcher": "$gcc",
        "args": [
            "-Wall",
            "-pthread",
            "-std=gnu++11",            
            "-o", "../../../../Bin/ConsoleTest", 
            "-I", "${workspaceRoot}", 
            "-I", "${workspaceRoot}/..", 
            "-I", "${workspaceRoot}/../Common",
            "-I", "${workspaceRoot}/../../Platforms/Linux",
            "-g", "ConsoleTest.cpp",                
            "~/Bin/opencv/lib/libopencv_core.a",
            "~/Bin/opencv/3rdparty/lib/libzlib.a"

        ],
        "group": {
            "kind": "build",
            "isDefault": true
        }
    }
]

}

0 个答案:

没有答案