Commit 9388dded by Ben Clayton

vscode: Rewrite tasks.json

• Update to the latest config version • Change the build folder to "${workspaceRoot}/build" • Add option to control cmake build type • Add new task to push current branch to gerrit Change-Id: I0465bec244ebc06fd7f0f460f5673ed666077a1d Reviewed-on: https://swiftshader-review.googlesource.com/c/24468 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 96861534
{ {
// See https://go.microsoft.com/fwlink/?LinkId=733558 // See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format // for the documentation about the tasks.json format
// Available variables which can be used inside of strings. // Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team // ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file // ${file}: the current opened file
...@@ -9,25 +8,45 @@ ...@@ -9,25 +8,45 @@
// ${fileDirname}: the current opened file's dirname // ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension // ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process // ${cwd}: the current working directory of the spawned process
"version": "2.0.0",
"version": "0.1.0",
"command": "sh",
"isShellCommand": true,
"args": ["-c"],
"showOutput": "always",
"suppressTaskName": true,
"options": {
"cwd": "${workspaceRoot}/debug"
},
"tasks": [ "tasks": [
{ {
"taskName": "cmake", "label": "make",
"args": ["cmake ."] "group": {
}, "kind": "build",
{ "isDefault": true
"taskName": "make", },
"args" : ["make -j4"], "type": "shell",
"isBuildCommand": true, "command": "sh",
"osx": {
"args": [
"-c",
"make -j$(sysctl -n hw.logicalcpu)"
]
},
"linux": {
"args": [
"-c",
"make -j$(nproc)"
]
},
"windows": {
"args": [
"-c",
"make"
]
},
"options": {
"cwd": "${workspaceRoot}/build",
},
"presentation": {
"echo": false,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
},
"problemMatcher": { "problemMatcher": {
"owner": "cpp", "owner": "cpp",
"fileLocation": "absolute", "fileLocation": "absolute",
...@@ -40,6 +59,47 @@ ...@@ -40,6 +59,47 @@
"message": 5 "message": 5
} }
} }
},
{
"label": "cmake",
"type": "shell",
"command": "cmake",
"args": [
"..",
"-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/master"
],
"options": {
"cwd": "${workspaceRoot}"
},
"problemMatcher": [],
} }
],
"inputs": [
{
"id": "buildType",
"type": "pickString",
"options": [
"Debug",
"Release",
"MinSizeRel",
"RelWithDebInfo",
],
"default": "Debug",
"description": "The type of build",
},
] ]
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment