vscode 配置task.json,执行多条指令


{
    "version": "2.0.0",
    "options": {
        "cwd": "${workspaceRoot}/build"
    },/////////////////////////////////////////////////指定命令执行所在路径
    "tasks": [
        {
            "label": "cmake",
            "type": "shell",
            "command": "cmake",
            "args": [
                "-G",
                "MinGW Makefiles",
                ".."
            ],
        },
        {
            "label": "make",/////////要执行的第二个make命令
            "type": "shell",
            "command": "mingw32-make",
            "args": [],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "dependsOn":["cmake"],///指定,在执行make之前,需先执行cmake
        },
    ]
}

先执行cmake再执行make