An open API service indexing awesome lists of open source software.

https://github.com/kjczarne/cpp_template

Multiplatform CMake + Conan + GoogleTest C++ project template for VSCode
https://github.com/kjczarne/cpp_template

Last synced: 3 months ago
JSON representation

Multiplatform CMake + Conan + GoogleTest C++ project template for VSCode

Awesome Lists containing this project

README

        

# cpp_template

This is a C++ project template tailored to a CMake/Conan/GoogleTest stack with support for Windows (MSVC), Linux (GCC) and Mac (GCC).

It has been designed to work with C/C++ VSCode Extension and CMake Tools VSCode Extension.

## Checklist

- [ ] Plugins

- [ ] Install C/C++ VSCode extension.
- [ ] Install CMake Tools VSCode extension.
- [ ] Install GoogleTest Adapter VSCode extension.

- [ ] Environment

- [ ] Using `scripts/set_vcvars.ps1 -Path /path/to/vcvarsall.bat` set the path to `vcvarsall.bat` script from MS VS 2019 installation.

- [ ] `.vscode` -> Visual Studio Code configuration.

- [ ] `c_cpp_properties.json` -> This file provides IntelliSense configuration for VSCode.

- [ ] Ensure the `cl.exe` compiler path for configuration `Win32` corresponds correctly to your local setup.
- [ ] Ensure the `g++` compiler path for configuration `Linux` corresponds correctly to your local setup.
- [ ] Adjust the standard used by the project with `cStandard` property.
- [ ] If you work with other people, encourage them to add their system-specific configurations to that file if they want to use IntelliSense in VSCode.

- [ ] `launch.json` -> Unit test/`main` debugger congfiguration.

- [ ] In `targetTestBinary` adjust the `options` list to the list of binaries you want to expose to the debugger. Omit the `.exe` extension if you're working on Windows.
- [ ] Adjust the `gdb` debugger path if necessary.

- [ ] `settings.json` -> local VSCode settings file.

- [ ] Adjust `gtest-adapter.debugConfig` to the Debug config name from `launch.json` that you're going to use (if you use GoogleTest).
- [ ] Adjust `cmake.configureSettings` to with options that are applicable to your project.
- [ ] Adjust `cmake.generator`. Default Generator is `Ninja`.

- [ ] `tasks.json` -> Shorthands for running repetitive commands.

- [ ] Change `project.sln` to the real Solution File name generated by CMake if you're working with MSBuild.
- [ ] Adjust Conan Package directory in the `Remove` tasks if you're working with Conan.

- [ ] `include`, `test` and `src`

- [ ] Delete files that you don't need and write your code.

- [ ] `CMakeLists.txt`

- [ ] Adjust the name of the project, the library and/or the library and/or the executable.
- [ ] Link any other headers and add directories to the project if necessary.
- [ ] Link tests.