Created
April 29, 2020 18:56
-
-
Save ganzuul/f85d3cfc4f2e9a93489d88f775f4b1c4 to your computer and use it in GitHub Desktop.
tasks.json for VSCode to build and run C++ on Linux
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "shell", | |
"label": "g++ build active file", | |
"command": "/usr/bin/g++", | |
"args": [ | |
"-g", | |
"${file}", | |
"-o", | |
"${fileDirname}/${fileBasenameNoExtension}" | |
], | |
"options": { | |
"cwd": "/usr/bin" | |
}, | |
"problemMatcher": [ | |
"$gcc" | |
] | |
}, | |
{ | |
"label": "run", | |
"type": "shell", | |
"command": "${fileDirname}/${fileBasenameNoExtension}", | |
}, | |
{ | |
"label": "build and run", | |
"dependsOrder": "sequence", | |
"dependsOn" : ["g++ build active file" , "run"], | |
"group": { | |
"kind": "build", | |
"isDefault": true | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment