Skip to content

Instantly share code, notes, and snippets.

@alessandrod
Last active September 8, 2016 02:54
Show Gist options
  • Save alessandrod/82f08750ee4c36860b3719765ad6140f to your computer and use it in GitHub Desktop.
Save alessandrod/82f08750ee4c36860b3719765ad6140f to your computer and use it in GitHub Desktop.
vscode tasks.json to build C/C++ projects which use make
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "env",
"isShellCommand": true,
"args": [],
"showOutput": "always",
"declares": [
{
"name": "make-compile",
"owner": "cpp",
"fileLocation": "relative",
"pattern": [
{
"regexp": "^((.*): Entering directory `(.*)'|(.*))$",
"filePrefix": 3
},
{
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
],
"tasks": [
{
"taskName": "make",
"echoCommand": true,
"args": ["make", "--print-directory", "-j20"],
"suppressTaskName": true,
"isBuildCommand": true,
"problemMatcher": "$make-compile"
},
{
"taskName": "make install",
"suppressTaskName": true,
"args": ["make", "--print-directory", "-j20", "install"],
"problemMatcher": "$make-compile"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment