C++ project template
| .vscode | ||
| addressbook | ||
| denv | ||
| .gitignore | ||
| CMakeLists.txt | ||
| LICENSE | ||
| reader.cpp | ||
| README.md | ||
| writer.cpp | ||
Template for C++ based projects
- environment: Docker container
- IDE: VsCode
- build system: CMake
- 3rd party libraries: vcpkg
- testing: Catch2
Development Environment
./denv/build.sh # create denv image
./denv/run-vsc.sh # run container & attach VsCode instance to it
CMake and CTests
CTest integration within VsCode is limited - it does not provide link between test case source and test shown in TestExplorer view.
Solution
- Disable (CMake > CTest:
Test Explorer IntegrationEnabled) - Install TestMate extension It scans the build tree for xxx_test binaries and has neat integration with Catch2.
- You need to enable
rebuild on savein order for tests in TestExplorer to automatically reflect changes in the code. If none - use F7 to rebuild project.