Created
March 20, 2020 11:33
-
-
Save jspw/59832daa972a6f60e52bda1f8c15ad64 to your computer and use it in GitHub Desktop.
task.json file config for vs code for competitive programming (linux users)
This file contains 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
//Author : 5hfT | |
//data:11th Feb,2020 | |
//Task:shortcut to run a cpp file which will take input and show output of the programme automatically with programme runtime status such as memory comsume and execution time | |
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Compile and run", | |
"type": "shell", | |
"command": "", | |
"args": [ | |
"g++", | |
"-g", | |
"${relativeFile}", | |
"-o", | |
"${fileBasenameNoExtension}.out", | |
"&&", | |
"clear", | |
"&&", | |
"timeout", | |
"10", | |
"/usr/bin/time", | |
"-v", | |
"--output", | |
"sys.txt", | |
"./${fileBasenameNoExtension}.out", | |
"<", | |
"input.txt", | |
">", | |
"output.txt", | |
"&&", | |
"nm", | |
"${fileBasenameNoExtension}.out", | |
">", | |
"binary.txt", | |
"&&", | |
"objdump", | |
"-D", | |
"${fileBasenameNoExtension}.out", | |
"|", | |
"less", | |
">", | |
"disassemble.txt", | |
"&&", | |
"rm", | |
"*out" | |
], | |
"group": { | |
"kind": "build", | |
"isDefault": true | |
}, | |
"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