Last active
April 22, 2022 16:08
-
-
Save bietdoikiem/cca4858402f5c789763c2053b797bb77 to your computer and use it in GitHub Desktop.
Tasks to build C++ with a single file
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "shell", | |
"label": "Make a bin directory", | |
"command": "mkdir -p bin" | |
}, | |
{ | |
"type": "cppbuild", | |
"label": "C/C++: g++-11 build active file", | |
"command": "/opt/homebrew/bin/g++-11", | |
"args": [ | |
"-std=c++20", | |
"-g", | |
"-D_GLIBCXX_DEBUG", | |
"-D_GLIBCXX_DEBUG_PEDANTIC", | |
"-Wall", | |
"-Wextra", | |
"-O2", | |
"${file}", | |
"-o", | |
"${fileDirname}/bin/${fileBasenameNoExtension}" | |
], | |
"options": { | |
"cwd": "${fileDirname}" | |
}, | |
"problemMatcher": ["$gcc"], | |
"group": "build", | |
"detail": "compiler: /opt/homebrew/bin/g++-11", | |
"dependsOn": ["Make a bin directory"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment