Created
June 30, 2023 05:20
-
-
Save AngKokLeong/24e9f891a47ccfd9c071efdcc67f0999 to your computer and use it in GitHub Desktop.
Build Task in Visual Studio Code for CPP project Clang compiler using C++ 20
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": "cppbuild", | |
"label": "C/C++: clang++-11 build active file", | |
"command": "/usr/bin/clang++-11", | |
"args": [ | |
"-fcolor-diagnostics", | |
"-fansi-escape-codes", | |
"-g", | |
"${file}", | |
"-o", | |
"${fileDirname}/${fileBasenameNoExtension}", | |
"-std=c++20" | |
], | |
"options": { | |
"cwd": "${fileDirname}" | |
}, | |
"problemMatcher": [ | |
"$gcc" | |
], | |
"group": "build", | |
"detail": "compiler: /usr/bin/g++-11" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-std=c++20 is added at Line 15 to configure clang to execute the build using C++ 20 standard