/cpp-project

A simple cpp project template, integrated github action, gtest, conan, cpplint, cppcheck

Primary LanguageCMakeMIT LicenseMIT

C++ moderm template build Build Status codecov Codacy Badge Documentation Status

This is a template to setting up a new C++ project, usually create a new C++ project requires a significant amount of preparation and boilerplate code, even more so for modern C++ projects with tests, executables and continuous integration. This template should help reduce the work required to setup up a modern C++ project.

Features

  • Sources, headers and mains separated in distinct folders
  • Use of modern CMake for much easier compiling
  • Automatic google code style check
  • Integrated test suite using gtest
  • Code coverage reports, including automatic upload to codecov.io
  • Setup for static code analysis using cppcheck
  • Continuous integration via GitHub Actions / Travis-CI
  • Support Conan package manager to quick install your package
  • Moderm github issues template
  • Integrated document system through redthedocs
  • Suited for single header libraries and projects of any scale

Usage

Setup

When starting a new project, you probably don't want the history of this repository. To start fresh you can use the setup script as follows:

$ git clone https://github.com/tweether/cpp-project && cd cpp-project
$ ./setup.sh

Building

Build by making a build directory (i.e. build/), run cmake in that dir, and then use make to build the desired target.

$ mkdir build && cd build
$ cmake ..
$ cmake --build .

Learning

GameMesh has the most extensive and thorough documentation, making it a breeze to get started with the framework.

Built-in server

A quick documention to install mkdocs.

$ mkdocs serve

Open up http://127.0.0.1:8000/ in your browser, and you'll see the document home page being displayed.

Requirements

Required:

Options: