simple c++ & cmake project template for Linux with various features
- CMake build system for C++ projects
- C++ formatting with clang-format
- CMake formatting with cmake-format
- Static code analysis with cppcheck & clang-tidy
- Project configuration with Kconfiglib
- Documentation generation with MkDocs, mkdocs-material theme with Github Pages deployment
- Testing with Catch2
- Automatic version header generation with Parse git tag
- Install & Uninstall targets
Every Dependency in this section is optional
CMake >= 3.12
C++ formatting:
sudo apt install clang-format
CMake formatting:
pip3 install cmake-format
Static code analysis:
sudo apt install cppcheck clang-tidy
Kconfig:
pip3 install kconfiglib
Documentation generation:
pip3 install mkdocs mkdocs-material pymdown-extensions
Testing:
- Install appropriate version of Catch2 by dpkg or source build
sudo apt install clang-format cppcheck clang-tidy
pip3 install cmake-format kconfiglib mkdocs mkdocs-material pymdown-extensions
Use this repository as a template repository in github or clone this repository
Automatic setup
# prepare template for your project
# set PROJECT_NAME to your project name. Without space(" ")
make prepare_template PROJECT_NAME=$(PROJECT_NAME)
Manual setup
- Change cmake/cpp-cmake-templateConfig.cmake.in to cmake/$(PROJECT_NAME)Config.cmake.in
- Change include/cpp-cmake-template to include/$(PROJECT_NAME)
- Replace 'cpp-cmake-template' to '$(PROJECT_NAME)' of CMakeLists.txt
Go to the settings of your repository and ensure that the publishing source branch for your GitHub Page is set to gh-pages
This project is licensed under the MIT License - see the LICENSE file for details
lightAxis - [email protected]