Skip to content

A template project (library and executable) for C++ projects with cmake, ctest, vcpkg, circleci, and automated document deploymend via doxygen to gh-pages



Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

cpptemplate {#mainpage}

A C++ GitHub template project.

CircleCI CodeFactor Grade Documentation License

A C++ GitHub template project consisting of a circleci build pipeline utilising cmake, ctest, vcpkg, and an automated documentation deployment via GitHub-Actions at gh-pages branch.

Getting Started

To build the project:

  • Setup toolchain ~/PROJECTNAME/build/cmake .. -DCMAKE_TOOLCHAIN_FILE={YOUR_PATH_TO_VCPKG}/scripts/buildsystems/vcpkg.cmake
  • Build ~/PROJECTNAME/build/cmake --build . --config Release
  • Execute the tests ~/PROJECTNAME/build/ctest
  • You can execute the program by ./build/app/PROJECTNAME

To update the docker image:

  • Edit the Dockerfile to your needs
  • Build docker image sudo docker build -t IMAGENAME .
  • Tag docker image with dockerhub username sudo docker tag IMAGENAME:TAG DOCKERHUBUSERNAME/IMAGENAME:TAG
  • Push docker image to dockerhub sudo docker push DOCKERHUBUSERNAME/IMAGENAME:TAG

To change/add dependencies:

  • Edit the vcpkg part of .cirlceci/config.yml to your needs
- run:
    name: Install vcpkg dependencies
    command: ./../../vcpkg/vcpkg install DEPENDENCIES


  • cmake – Open-Source, cross-platform build tool
  • fmt – External library used for formatting and printing results
  • doctest – Feature-rich C++11/14/17/20 single-header testing framework for unit tests and TDD
  • vcpkg – C++ Library Manager for Windows, Linux, and MacOS
  • python 3 – A programming language used to convert ctest results with a xml transformation (xslt)

Release History

  • 1.1.0
    • CHANGED: extended and several links corrected
    • CHANGED: Dockerfile cleaned up which also lead to a slightly smaller docker image
  • 1.0.0
    • ADD: Customized docker image for C++/cmake builds with vcpkg as dependency manager
    • ADD: GitHub action to generate documentation
    • ADD: GitHub project template


Documentation can be found at

Benjamin MahrGitHub
                          – LinkedIn
                          – Twitter
                          – Mail

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


  1. Fork it (
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request