This is a C++ base template structure to use in any vanilla/base project. This is great for testing and experiments.
This project use VSCode as a cross-platform editor.
Reference: VSCode: Introductory Videos for C++
Linux / Mac
Windows
Any platform
- CMake [optional]
-
Clone this repo
-
Open this project using VSCode
PS: Additionally, check the official tutorials of
C++integration withVSCode(e.g Using C++ on Linux in VS Code ) -
Install recommended extensions such as Microsoft C/C++ extensions
-
Run build task and/or debug on
VSCode:)PS: To build/debug with
CMake, see this link here: vscode-cmake-linux/Build hello world
This project use GoogleTest + CMake. You can use VSCode tasks or execute CMake: [action] from CMake Tools VSCode extension:
-
Open the Comand Palette (
Ctrl+Shift+P) and execute the commandCmake: Run Tests -
Alternatively, Open the Comand Palette (
Ctrl+Shift+P), but this time run the VSCode Task on:Run Task=>CMake: run tests -
See the result output on VSCode terminal
Optionally, you can use the VSCode extension vscode-catch2-test-adapter to see all tests in a panel on the left side of the editor.
PS: For now, is necessary build the code before run tests on this panel (e.g using
Cmake: Buildcommand). There is a github issue with alternatives to solve this: vscode-catch2-test-adapter#127




