Cpp-Project-Template
A C++ project template uses CMake with Doxygen, Sphinx integrated
Used for
Two main things when starting a new Cpp project
- Dependency
- Documentation
And of course, a general purpose Cpp project structure
Features
- Package Management using
- Project Documentation using
- CMake Integratation
Prerequisite
Basically you just need CMake and a C++ compiler.
If you want to take the way provided by this repo, you also need
Installation
Use this template
You can click the Use this template button to create your new Github repository
Clone this repository
- clone this repository
> git clone https://github.com/WilliamCodeBox/Cpp-Project-Template.git
- use the name of your greate Cpp project
> mv Cpp-Project-Template NameOfYourCppProject
- start over the version control
> cd NameOfYourCppProject > rm -rf .git > git init
Usage
-
Environment for documentation
Suggestion: create a virtural python environment using conda
- TODO: may be a python/bash script to automatically run the following steps
-
install required python packages
> cd docs > pip install -r requirements.txt
-
change relavent content within
config.json
project
= 'cpp-project-template'author
= 'WilliamCodeBox'release
= '1.0.0'sourceDir
= "../include"rootFileTitle
= "Library API"
-
Generate the docs
> make html
-
Third-party C++ libraries
- search and install the libs with the help of
vcpkg
> ./vcpkg search gtest > ./vcpkg install gtest
- find the libs within
CMakeLists.txt
- search and install the libs with the help of