blob: 7a88e94bec822fe90f7f1ecba03d526ca4a512a7 [file] [log] [blame]
Nicolas Capensc8713532017-04-26 11:52:47 -04001{
2 // See https://go.microsoft.com/fwlink/?LinkId=733558
3 // for the documentation about the tasks.json format
Nicolas Capensc8713532017-04-26 11:52:47 -04004 // Available variables which can be used inside of strings.
5 // ${workspaceRoot}: the root folder of the team
6 // ${file}: the current opened file
7 // ${fileBasename}: the current opened file's basename
8 // ${fileDirname}: the current opened file's dirname
9 // ${fileExtname}: the current opened file's extension
10 // ${cwd}: the current working directory of the spawned process
Ben Clayton9388dde2019-02-06 10:28:14 +000011 "version": "2.0.0",
Nicolas Capensc8713532017-04-26 11:52:47 -040012 "tasks": [
13 {
Ben Clayton9388dde2019-02-06 10:28:14 +000014 "label": "make",
15 "group": {
16 "kind": "build",
17 "isDefault": true
18 },
19 "type": "shell",
20 "command": "sh",
21 "osx": {
22 "args": [
23 "-c",
24 "make -j$(sysctl -n hw.logicalcpu)"
25 ]
26 },
27 "linux": {
28 "args": [
29 "-c",
30 "make -j$(nproc)"
31 ]
32 },
33 "windows": {
34 "args": [
35 "-c",
36 "make"
37 ]
38 },
39 "options": {
40 "cwd": "${workspaceRoot}/build",
41 },
42 "presentation": {
43 "echo": false,
44 "reveal": "always",
45 "focus": false,
46 "panel": "shared",
47 "showReuseMessage": false,
48 "clear": true,
49 },
Nicolas Capensc8713532017-04-26 11:52:47 -040050 "problemMatcher": {
51 "owner": "cpp",
52 "fileLocation": "absolute",
53 "pattern": {
54 "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
55 "file": 1,
56 "line": 2,
57 "column": 3,
58 "severity": 4,
59 "message": 5
60 }
61 }
Ben Clayton9388dde2019-02-06 10:28:14 +000062 },
63 {
64 "label": "cmake",
65 "type": "shell",
66 "command": "cmake",
67 "args": [
68 "..",
Ben Clayton7aafb272019-02-19 17:08:56 +000069 "-DCMAKE_BUILD_TYPE=${input:buildType}",
Ben Claytonf1172912019-02-26 16:52:12 +000070 "-DWARNINGS_AS_ERRORS=1",
71 "-DDCHECK_ALWAYS_ON=1"
Ben Clayton9388dde2019-02-06 10:28:14 +000072 ],
73 "options": {
74 "cwd": "${workspaceRoot}/build"
75 },
76 "problemMatcher": [],
77 },
78 {
79 "label": "Push branch for review",
80 "type": "shell",
81 "command": "git",
82 "args": [
83 "push",
84 "origin",
85 "HEAD:refs/for/master"
86 ],
87 "options": {
88 "cwd": "${workspaceRoot}"
89 },
90 "problemMatcher": [],
Nicolas Capensc8713532017-04-26 11:52:47 -040091 }
Ben Clayton9388dde2019-02-06 10:28:14 +000092 ],
93 "inputs": [
94 {
95 "id": "buildType",
96 "type": "pickString",
97 "options": [
98 "Debug",
99 "Release",
100 "MinSizeRel",
101 "RelWithDebInfo",
102 ],
103 "default": "Debug",
104 "description": "The type of build",
105 },
Nicolas Capensc8713532017-04-26 11:52:47 -0400106 ]
107}