Skip to content

VersatusHPC/cmake_template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

641 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmake_template

ci codecov CodeQL

About cmake_template

This is a C++ Best Practices GitHub template for getting up and running with C++ quickly.

By default, developer mode enables

  • Address Sanitizer and Undefined Behavior Sanitizer enabled where possible
  • Warnings as errors
  • clang-tidy and cppcheck static analysis
  • Conan 2.0 for dependency management

It includes

  • a basic CLI example
  • examples for fuzz, unit, and constexpr testing
  • large GitHub action testing matrix
  • WebAssembly build support with automatic GitHub Pages deployment

Code quality tools

Documentation

Development environment

  • Devcontainer based on Red Hat UBI 10 with GCC 14, Clang 19, and all tools pre-installed

Acknowledgements

This template is heavily based on cpp-best-practices/cmake_template by Jason Turner and the C++ Best Practices community. Their work on CMake infrastructure, CI workflows, and developer tooling laid the foundation for this project.

If you enable GitHub Pages on a repository created from this template, the default branch (main or master) deploys to the root, develop to /develop/, and tags to /tagname/.

It requires

  • cmake
  • a C++23 compiler
  • Conan 2.0

This project gets you started with a simple example of using FTXUI, which happens to also be a game.

Getting Started

Use the GitHub template

First, click the green Use this template button near the top of this page. This will take you to GitHub's 'Generate Repository' page. Fill in a repository name and short description, and click 'Create repository from template'. This will allow you to create a new repository in your GitHub account, prepopulated with the contents of this project.

After creating the project please wait until the cleanup workflow has finished setting up your project and committed the changes.

Now you can clone the project locally and get to work!

git clone https://github.com/<user>/<your_new_repo>.git

Set up pre-commit hooks

pipx install pre-commit
pre-commit install

See CONTRIBUTING.md for commit message policy and developer workflow.

More Details

Testing

See Catch2 tutorial

Fuzz testing

See libFuzzer Tutorial

About

CMake for C++ Best Practices

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • CMake 79.1%
  • C++ 15.4%
  • Dockerfile 3.2%
  • Python 2.3%