- unit testing with googletest
- common components with wheels
- simple commands for all needs with make
- containerization with docker & docker compose
- code linting with clang-tidy
- code formatting with clang-format
- configured ub, address & thread sanitizers
To run the project locally, you need to install the following dependencies:
Optionally:
- clang-format (for autoformatting)
- clang-tidy (for linting)
- docker & docker compose (for containerization)
- Click on the "Use this template" button and clone your repo:
git clone https://github.com/daronenko/cpp-template.git
- Rename the project (only works on linux):
find . -not -path "./third_party/*" -not -path ".git/*" -not -path './build_*' -type f | xargs sed -i 's/cpp-template/<YOUR-PROJECT-NAME>/g'
You can check if everything has been replaced with:
grep -r "cpp-template" .
make build-debug
- build debug versionmake start-debug
- run debug versionmake test-debug
- build debug, unit tests and run testsmake clean-debug
- removebuild_debug
directory (also works for docker)make install-debug
- install debug version of project in/usr/local/bin/
make docker-build-debug
- build debug in dockermake docker-start-debug
- run the container with debug versionmake docker-test-debug
- build debug and run tests
make
- test and run release version of projectmake build-release
- build release versionmake start-release
- run release versionmake test-release
- build release, unit tests and run testsmake clean-release
- removebuild_release
directory (also works for docker)make install
ormake install-release
- install release version of project in/usr/local/bin/
make docker-build-release
- build release in dockermake docker-start-release
- run the container with release versionmake docker-test-release
- build release and run tests
make format
- autoformat.cpp
and.hpp
filesmake lint
- check.cpp
and.hpp
files with lintermake clean-docker
- stop and remove container
Distributed under the MIT License. See LICENSE for more information.