2021-03-24 10:20:01 +00:00
|
|
|
{
|
|
|
|
// 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": [
|
|
|
|
// Invokes ninja in the 'out/active' directory, which is created with
|
|
|
|
// the 'gn gen' task (see below).
|
|
|
|
{
|
|
|
|
"label": "build",
|
|
|
|
"group": {
|
|
|
|
"kind": "build",
|
|
|
|
"isDefault": true
|
|
|
|
},
|
|
|
|
"type": "shell",
|
|
|
|
"linux": {
|
|
|
|
"command": "sh",
|
|
|
|
"args": [
|
|
|
|
"-c",
|
|
|
|
"ninja && echo Done"
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"osx": {
|
|
|
|
"command": "sh",
|
|
|
|
"args": [
|
|
|
|
"-c",
|
|
|
|
"ninja && echo Done"
|
|
|
|
],
|
|
|
|
},
|
2021-03-24 13:08:41 +00:00
|
|
|
"windows": {
|
2021-07-19 17:16:28 +00:00
|
|
|
"command": "/C",
|
2021-03-24 13:08:41 +00:00
|
|
|
"args": [
|
2021-07-19 17:16:28 +00:00
|
|
|
"ninja && echo Done",
|
2021-03-24 13:08:41 +00:00
|
|
|
],
|
2021-07-19 17:16:28 +00:00
|
|
|
"options": {
|
|
|
|
"shell": {
|
|
|
|
"executable": "cmd"
|
|
|
|
},
|
|
|
|
}
|
2021-03-24 13:08:41 +00:00
|
|
|
},
|
2021-03-24 10:20:01 +00:00
|
|
|
"options": {
|
|
|
|
"cwd": "${workspaceRoot}/out/active",
|
|
|
|
},
|
|
|
|
"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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// Generates a GN build directory at 'out/<build-type>' with the
|
|
|
|
// is_debug argument set to to true iff the build-type is Debug.
|
|
|
|
// A symbolic link to this build directory is created at 'out/active'
|
|
|
|
// which is used to track the active build directory.
|
|
|
|
{
|
|
|
|
"label": "gn gen",
|
|
|
|
"type": "shell",
|
|
|
|
"linux": {
|
2022-04-07 19:22:21 +00:00
|
|
|
"command": "./tools/setup-build",
|
2021-03-24 10:20:01 +00:00
|
|
|
"args": [
|
2022-04-07 19:22:21 +00:00
|
|
|
"gn",
|
|
|
|
"${input:buildType}",
|
2022-10-13 12:55:42 +00:00
|
|
|
"${input:buildArch}",
|
2021-03-24 10:20:01 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
"osx": {
|
2022-04-07 19:22:21 +00:00
|
|
|
"command": "./tools/setup-build",
|
2021-03-24 10:20:01 +00:00
|
|
|
"args": [
|
2022-04-07 19:22:21 +00:00
|
|
|
"gn",
|
|
|
|
"${input:buildType}",
|
2022-10-13 12:55:42 +00:00
|
|
|
"${input:buildArch}",
|
2021-03-24 10:20:01 +00:00
|
|
|
],
|
|
|
|
},
|
2021-03-24 13:08:41 +00:00
|
|
|
"windows": {
|
2021-07-19 17:16:28 +00:00
|
|
|
"command": "/C",
|
2021-03-24 13:08:41 +00:00
|
|
|
"args": [
|
2021-07-21 14:07:49 +00:00
|
|
|
"(IF \"${input:buildType}\" == \"Debug\" ( gn gen \"out\\${input:buildType}\" --args=is_debug=true ) ELSE ( gn gen \"out\\${input:buildType}\" --args=is_debug=false )) && (IF EXIST \"out\\active\" rmdir \"out\\active\" /q /s) && (mklink /j \"out\\active\" \"out\\${input:buildType}\")",
|
2021-03-24 13:08:41 +00:00
|
|
|
],
|
2021-07-19 17:16:28 +00:00
|
|
|
"options": {
|
|
|
|
"shell": {
|
|
|
|
"executable": "cmd"
|
|
|
|
},
|
|
|
|
}
|
2021-03-24 13:08:41 +00:00
|
|
|
},
|
2021-03-24 10:20:01 +00:00
|
|
|
"options": {
|
|
|
|
"cwd": "${workspaceRoot}"
|
|
|
|
},
|
|
|
|
"problemMatcher": [],
|
|
|
|
},
|
2022-04-07 19:22:21 +00:00
|
|
|
{
|
|
|
|
"label": "cmake gen",
|
|
|
|
"type": "shell",
|
|
|
|
"linux": {
|
|
|
|
"command": "./tools/setup-build",
|
|
|
|
"args": [
|
|
|
|
"cmake",
|
|
|
|
"${input:buildType}",
|
2022-10-13 12:55:42 +00:00
|
|
|
"${input:buildArch}",
|
2022-04-07 19:22:21 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
"osx": {
|
|
|
|
"command": "./tools/setup-build",
|
|
|
|
"args": [
|
|
|
|
"cmake",
|
|
|
|
"${input:buildType}",
|
2022-10-13 12:55:42 +00:00
|
|
|
"${input:buildArch}",
|
2022-04-07 19:22:21 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
"windows": {
|
|
|
|
"command": "/C",
|
|
|
|
"args": [
|
|
|
|
"echo TODO",
|
|
|
|
],
|
|
|
|
"options": {
|
|
|
|
"shell": {
|
|
|
|
"executable": "cmd"
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"options": {
|
|
|
|
"cwd": "${workspaceRoot}"
|
|
|
|
},
|
|
|
|
"problemMatcher": [],
|
|
|
|
},
|
2021-03-24 13:08:41 +00:00
|
|
|
// Rebases the current branch on to origin/main and then calls
|
2021-03-24 10:20:01 +00:00
|
|
|
// `gclient sync`.
|
|
|
|
{
|
|
|
|
"label": "sync",
|
|
|
|
"type": "shell",
|
|
|
|
"linux": {
|
|
|
|
"command": "sh",
|
|
|
|
"args": [
|
|
|
|
"-c",
|
2021-03-24 13:08:41 +00:00
|
|
|
"git fetch origin && git rebase origin/main && gclient sync && echo Done"
|
2021-03-24 10:20:01 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
"osx": {
|
|
|
|
"command": "sh",
|
|
|
|
"args": [
|
|
|
|
"-c",
|
2021-03-24 13:08:41 +00:00
|
|
|
"git fetch origin && git rebase origin/main && gclient sync && echo Done"
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"windows": {
|
2021-07-19 17:16:28 +00:00
|
|
|
"command": "/C",
|
2021-03-24 13:08:41 +00:00
|
|
|
"args": [
|
2021-07-19 17:16:28 +00:00
|
|
|
"git fetch origin && git rebase origin/main && gclient sync && echo Done",
|
2021-03-24 10:20:01 +00:00
|
|
|
],
|
2021-07-19 17:16:28 +00:00
|
|
|
"options": {
|
|
|
|
"shell": {
|
|
|
|
"executable": "cmd"
|
|
|
|
},
|
|
|
|
}
|
2021-03-24 10:20:01 +00:00
|
|
|
},
|
|
|
|
"options": {
|
|
|
|
"cwd": "${workspaceRoot}"
|
|
|
|
},
|
|
|
|
"problemMatcher": [],
|
|
|
|
},
|
|
|
|
// Pushes the changes at HEAD to gerrit for review
|
|
|
|
{
|
|
|
|
"label": "push",
|
|
|
|
"type": "shell",
|
|
|
|
"command": "git",
|
|
|
|
"args": [
|
|
|
|
"push",
|
|
|
|
"origin",
|
|
|
|
"HEAD:refs/for/main"
|
|
|
|
],
|
|
|
|
"options": {
|
|
|
|
"cwd": "${workspaceRoot}"
|
|
|
|
},
|
|
|
|
"problemMatcher": [],
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"inputs": [
|
|
|
|
{
|
|
|
|
"id": "buildType",
|
|
|
|
"type": "pickString",
|
|
|
|
"options": [
|
|
|
|
"Debug",
|
|
|
|
"Release",
|
|
|
|
],
|
|
|
|
"default": "Debug",
|
|
|
|
"description": "The type of build",
|
|
|
|
},
|
2022-10-13 12:55:42 +00:00
|
|
|
{
|
|
|
|
"id": "buildArch",
|
|
|
|
"type": "pickString",
|
|
|
|
"options": [
|
|
|
|
"native",
|
|
|
|
"x86",
|
|
|
|
],
|
|
|
|
"default": "native",
|
|
|
|
"description": "The build architecture",
|
|
|
|
},
|
2021-03-24 10:20:01 +00:00
|
|
|
]
|
2022-04-07 19:22:21 +00:00
|
|
|
}
|