Created
October 18, 2022 06:08
-
-
Save whoisryosuke/dabddf557b10b65f7d1610279c73a5cd to your computer and use it in GitHub Desktop.
C++ / CMake / VSCode - Tasks for building and testing (using ModernCppStarter). Swap out `GreeterTests` with your test file's name.
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": "CMake: build", | |
"command": "cmake --build build/standalone", | |
"group": "build", | |
"problemMatcher": [], | |
"detail": "CMake build task" | |
}, | |
{ | |
"type": "shell", | |
"label": "CMake: build init", | |
"command": "cmake -S standalone -B build/standalone", | |
"group": "build", | |
"problemMatcher": [], | |
"detail": "CMake initialize build task" | |
}, | |
{ | |
"type": "shell", | |
"label": "CMake: test init", | |
"command": "cmake -S test -B build/test", | |
"group": "test", | |
"problemMatcher": [], | |
"detail": "CMake initialize test task" | |
}, | |
{ | |
"type": "shell", | |
"label": "CMake: test", | |
"command": "cmake --build build/test; ${workspaceFolder}/build/test/Debug/GreeterTests.exe", | |
"group": "test", | |
"problemMatcher": [], | |
"detail": "CMake build test task" | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment