From a41b316ace0c1a6e83ea3eb1427ce8f2a9fde5d6 Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Tue, 11 Sep 2018 13:02:47 +0200 Subject: [PATCH] Add tasks.json for VS Code --- .vscode/tasks.json | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..5aaf188 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,72 @@ +{ + "version": "2.0.0", + "windows": { + "command": "C:\\msys64\\usr\\bin\\bash.exe", + "args": ["-lc", "([ -f build/build.ninja ] || meson build) && ninja -C build | cat"] + }, + "linux": { + "args": ["-lc", "cd \"\"${workspaceRoot}\"\" && ([ -f build/build.ninja ] || meson build) && ninja -C build && cd build && $@"], + "command": "/bin/bash" + }, + "osx": { + "args": ["-lc", "cd \"\"${workspaceRoot}\"\" && ([ -f build/build.ninja ] || meson build) && ninja -C build && cd build && $@"], + "command": "/bin/bash" + }, + "options": { + "env": { + "LANG": "C.UTF-8", + "PYTHONUNBUFFERD": "1", + "MSYSTEM": "MINGW64", + "CHERE_INVOKING": "1" + } + }, + "tasks": [ + { + "label": "build", + "problemMatcher": { + "owner": "cpp", + "fileLocation": [ + "relative", + "${workspaceRoot}/build" + ], + "pattern": { + "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|fatal error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 + } + }, + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "test", + "args": [ + "./unittest" + ], + "problemMatcher": { + "owner": "cpp", + "fileLocation": [ + "relative", + "${workspaceRoot}/build/" + ], + "pattern": { + "regexp": "^(.*?)[:\\(](\\d+)(:(\\d+))?\\)?:\\s+(warning|error|fatal error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 4, + "severity": 5, + "message": 6 + } + }, + "group": { + "kind": "test", + "isDefault": true + } + } + ] +}