From 63c87d95822ac9ca56e172ae5f8b600e5535ba8b Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Tue, 16 Mar 2021 13:33:23 +0000 Subject: [PATCH] Add .vscode/tasks.json Contains a bunch of helper tasks for building the project and pushing changes to gerrit Change-Id: I1f2b118e0fd811c5b67f26803d94569609697284 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44785 Auto-Submit: Ben Clayton Reviewed-by: Antonio Maiorano Commit-Queue: Antonio Maiorano --- .gitignore | 3 +- .vscode/tasks.json | 106 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 17e10ddf34..00f82a1216 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,8 @@ .gclient .gclient_entries .vs -.vscode +.vscode/* +!.vscode/tasks.json .idea build buildtools diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..a00b39520e --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,106 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + // Available variables which can be used inside of strings. + // ${workspaceRoot}: the root folder of the team + // ${file}: the current opened file + // ${fileBasename}: the current opened file's basename + // ${fileDirname}: the current opened file's dirname + // ${fileExtname}: the current opened file's extension + // ${cwd}: the current working directory of the spawned process + "version": "2.0.0", + "tasks": [ + { + "label": "make", + "group": { + "kind": "build", + "isDefault": true + }, + "type": "shell", + "command": "sh", + "osx": { + "args": [ + "-c", + "cmake --build . && echo Done" + ] + }, + "linux": { + "args": [ + "-c", + "cmake --build . && echo Done" + ] + }, + "windows": { + "args": [ + "-c", + "cmake --build . && echo Done" + ] + }, + "options": { + "cwd": "${workspaceRoot}/build", + }, + "presentation": { + "echo": false, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true, + }, + "problemMatcher": { + "owner": "cpp", + "fileLocation": "absolute", + "pattern": { + "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 + } + } + }, + { + "label": "cmake", + "type": "shell", + "command": "cmake", + "args": [ + "..", + "-GNinja", + "-DCMAKE_BUILD_TYPE=${input:buildType}", + ], + "options": { + "cwd": "${workspaceRoot}/build" + }, + "problemMatcher": [], + }, + { + "label": "Push branch for review", + "type": "shell", + "command": "git", + "args": [ + "push", + "origin", + "HEAD:refs/for/main" + ], + "options": { + "cwd": "${workspaceRoot}" + }, + "problemMatcher": [], + } + ], + "inputs": [ + { + "id": "buildType", + "type": "pickString", + "options": [ + "Debug", + "Release", + "MinSizeRel", + "RelWithDebInfo", + ], + "default": "Debug", + "description": "The type of build", + }, + ] +}