A quick C++ template for modern CMake projects aimed to be an easy-to-use starting point. This is my personal take on such a type of template, thus I might not use the best practices or you might disagree with how I do things. Any and all feedback is greatly appreciated! Modern CMake configuration and project, which, to the best of my knowledge, uses the best practices. An example of a Clang-Format config, inspired from the base Google model, with minor tweaks. This is aimed only as a starting point, as coding style is a subjective matter, everyone is free to either delete it (for the LLVM default) or supply their own alternative. Static analyzers integration, with Clang-Tidy and Cppcheck, the former being the default option. Doxygen support, through the ENABLE_DOXYGEN option, which you can enable if you wish to use it. Unit testing support, through GoogleTest (with an option to enable GoogleMock) or Catch2. Code coverage, enabled by using the ENABLE_CODE_COVERAGE op.

Features

  • Permissive license to allow you to integrate it as easily as possible
  • The template is licensed under the Unlicense
  • Options to build as a header-only library or executable
  • Ccache integration, for speeding up rebuild times
  • Unit testing support, through GoogleTest
  • Static analyzers integration, with Clang-Tidy and Cppcheck

Project Samples

Project Activity

See All Activity >

Follow Modern C++ Template

Modern C++ Template Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Modern C++ Template!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

C++

Related Categories

C++ Software Development Software, C++ Admin Templates, C++ Code Coverage Tool

Registered

2022-05-25