Skip to content

Repository files navigation

Welcome to Your Project

License: MIT Documentation Status codecov

Prerequisites

Building Your Project requires the following software installed:

  • A C++20-compliant compiler
  • CMake >= 3.28
  • Doxygen (optional, documentation building is skipped if missing)
  • The testing framework Catch2 for building the test suite

Building Your Project

The following sequence of commands builds Your Project. It assumes that your current working directory is the top-level directory of the freshly cloned repository:

cmake -B build
cmake --build build

The build process can be customized with the following CMake variables, which can be set by adding -D<var>={ON, OFF} to the cmake call:

  • your-project_BUILD_TESTING: Enable building of the test suite (default: ON)
  • your-project_BUILD_DOCS: Enable building the documentation (default: ON)

Alternatively, the available CMake presets can be displayed via cmake --list-presets=all. For example, the test workflow preset can be invoked with

cmake --workflow --preset test

It configures the project in debug mode, builds the test executables, and runs the tests, all in one go.

Testing Your Project

When built according to the above explanation (with -Dyour-project_BUILD_TESTING=ON), the C++ test suite of Your Project can be run using ctest from the build directory:

cd build
ctest

Documentation

Your Project provides a Sphinx-based documentation, that can be browsed online at readthedocs.org. To build it locally, first ensure the requirements are installed by running this command from the top-level source directory:

pip install -r doc/requirements.txt

Then build the sphinx documentation from the top-level directory:

cmake --build build --target sphinx-doc

The web documentation can then be browsed by opening build/doc/sphinx/index.html in your browser.

Acknowledgments

This repository was set up using the SSC Cookiecutter for C++ Packages.

About

A simple template for C++ projects: CMake, Unit tests, Continous Integration all set up and ready to go.

Resources

Stars

41 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages