A modern cmake starter project for C++ with a complete build lifecycle, testing, dependency management, etc. Portable across Linux, OS X and Windows.
Key Features • Project Documentation • Getting Started • Contributing • Credits •
Have you ever found yourself spending countless hours trying to figure out how to start a professional C++ project with unit tests, a robust dev workflow, change logs, code coverage, linting, formatting...? The C++ ecosystem is getting better but is still very far away from other ecosystems such as JavaScript, or even Rust. It's certainly easy to use CMake, a compiler and vscode to start a hello world project, but as soon as you start having multiple modules, with third party dependencies, testing, coverage, and other development things that a professional quality project needs, you start wasting hours and hours troubleshooting and configuring until you make it work.
Waste your time no more!
This starter project solves most of your problems, using the best practices for C++ development and modern CMake and allows you to get started in minutes rather than days.
CMake
as the build system with or without presetsCMake
build helpers to facilitate declaration of library, exe, test modules,
for the end-to-end lifecycle including doc generation, test, packaging etc...ccache
empowered cachingCMake
package management with CPM
We have detailed guides for setting up an efficient development environment, the development process, project structure, etc. Take a look at the project's github pages here.
It is strongly recommended that you take some time to browse the project documentation to familiarize yourself with its structure and development workflows.
For the impatient, or the already experts, below is a short tutorial video for how to start from asap to make your own project.
asap
templateIn this step, we'll clean up the freshly created repo and prepare it for being customized.
In this step, we'll go into Visual Studio Code to do some heavier customizations while tracking our changes in git.
For this final tutorial, we will ad an executable module to implement the famous "Hello World!". You can see how simple it is and how fast it is to hit the ground running with asap and start focusing on what matters the most: coding.
Take some time to explore the different build targets in the project, and the documentation to add tests, documentation etc.
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request. When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible.
By contributing your code, you agree to license your contribution under the terms of the BSD-3-Clause or a more permissive license. All files are released with the BSD-3-Clause license.
Read the developer guides.