Last active
September 8, 2016 02:54
-
-
Save alessandrod/82f08750ee4c36860b3719765ad6140f to your computer and use it in GitHub Desktop.
vscode tasks.json to build C/C++ projects which use make
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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