浮云间
新的2.0.0 tasks.json版本的makefile任务示例。在下面的一些评论的片段中,我希望它们会有用。{ "version": "2.0.0", "tasks": [ { "label": "<TASK_NAME>", "type": "shell", "command": "make", // use options.cwd property if the Makefile is not in the project root ${workspaceRoot} dir "options": { "cwd": "${workspaceRoot}/<DIR_WITH_MAKEFILE>" }, // start the build without prompting for task selection, use "group": "build" otherwise "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared" }, // arg passing example: in this case is executed make QUIET=0 "args": ["QUIET=0"], // Use the standard less compilation problem matcher. "problemMatcher": { "owner": "cpp", "fileLocation": ["absolute"], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ]}