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

posted @ 2020-03-10 19:41  ldfm  阅读(15496)  评论(0编辑  收藏  举报