Skip to content

simple and powerful template for your projects in c++

License

Notifications You must be signed in to change notification settings

daronenko/cpp-template

Repository files navigation

cpp-template

simple and powerful template for your projects in c++

Contents

Features

Dependencies

To run the project locally, you need to install the following dependencies:

Optionally:

Getting Started

  1. Click on the "Use this template" button and clone your repo:
git clone https://github.com/daronenko/cpp-template.git
  1. 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" .

Commands

Debug

  • make build-debug - build debug version
  • make start-debug - run debug version
  • make test-debug - build debug, unit tests and run tests
  • make clean-debug - remove build_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 docker
  • make docker-start-debug - run the container with debug version
  • make docker-test-debug - build debug and run tests

Release

  • make - test and run release version of project
  • make build-release - build release version
  • make start-release - run release version
  • make test-release - build release, unit tests and run tests
  • make clean-release - remove build_release directory (also works for docker)
  • make install or make install-release - install release version of project in /usr/local/bin/
  • make docker-build-release - build release in docker
  • make docker-start-release - run the container with release version
  • make docker-test-release - build release and run tests

Other

  • make format - autoformat .cpp and .hpp files
  • make lint - check .cpp and .hpp files with linter
  • make clean-docker - stop and remove container

Inspired by

License

Distributed under the MIT License. See LICENSE for more information.