https://github.com/cpp-best-practices/cmake_template
CMake for C++ Best Practices
https://github.com/cpp-best-practices/cmake_template
Last synced: 7 months ago
JSON representation
CMake for C++ Best Practices
- Host: GitHub
- URL: https://github.com/cpp-best-practices/cmake_template
- Owner: cpp-best-practices
- License: unlicense
- Created: 2022-03-11T01:45:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T00:25:02.000Z (7 months ago)
- Last Synced: 2025-05-01T01:28:48.144Z (7 months ago)
- Language: CMake
- Homepage:
- Size: 804 KB
- Stars: 1,315
- Watchers: 19
- Forks: 144
- Open Issues: 54
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-modern-cpp - cmake_template - A template CMake project to get you started with C++ and tooling. (Project Starter Templates / Websites)
README
# cmake_template
[](https://github.com/cpp-best-practices/cmake_template/actions/workflows/ci.yml)
[](https://codecov.io/gh/cpp-best-practices/cmake_template)
[](https://github.com/cpp-best-practices/cmake_template/actions/workflows/codeql-analysis.yml)
## About cmake_template
This is a C++ Best Practices GitHub template for getting up and running with C++ quickly.
By default (collectively known as `ENABLE_DEVELOPER_MODE`)
* Address Sanitizer and Undefined Behavior Sanitizer enabled where possible
* Warnings as errors
* clang-tidy and cppcheck static analysis
* CPM for dependencies
It includes
* a basic CLI example
* examples for fuzz, unit, and constexpr testing
* large GitHub action testing matrix
It requires
* cmake
* a compiler
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'](https://github.com/cpp-best-practices/cmake_template/generate)
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//.git
## More Details
* [Dependency Setup](README_dependencies.md)
* [Building Details](README_building.md)
* [Docker](README_docker.md)
## Testing
See [Catch2 tutorial](https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md)
## Fuzz testing
See [libFuzzer Tutorial](https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md)