Skip to content

Instantly share code, notes, and snippets.

@wolf99
Last active May 22, 2019 09:57
Show Gist options
  • Save wolf99/26c3a824e5fa244c6e4d to your computer and use it in GitHub Desktop.
Save wolf99/26c3a824e5fa244c6e4d to your computer and use it in GitHub Desktop.
Visual Studio Code tasks.json for GCC
// 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": "0.1.0",
"command": "gcc",
"args": ["-Wall", "helloWorld.c", "-o", "helloWorld"],
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment