A reusable, cross-platform C++20 starter project using modern CMake.
Keep the structure standard. Keep the implementation elastic.
CppStarter provides a clean, reusable foundation for modern C++ projects.
The goal is not to prescribe software architecture, but to standardize the project structure, build system, and development workflow, allowing the implementation to remain flexible.
- Modern CMake (3.20+)
- C++20
- Cross-platform
- Apple Clang
- LLVM Clang
- GCC
- Microsoft Visual C++
- Separate source, include, documentation and test directories
- CTest integration
- Compiler warnings enabled
- Git-friendly project layout
- Designed to evolve with your projects
- CMake 3.20 or newer
- A C++20 compatible compiler
Supported compilers include:
- Apple Clang
- LLVM Clang
- GCC
- Microsoft Visual C++
cpp-starter/
│
├── build/ # Generated by CMake (not committed)
├── docs/
├── include/
├── src/
├── tests/
│
├── .gitignore
├── CMakeLists.txt
└── README.md
Generate the build directory.
cmake -S . -B buildCompile the project.
cmake --build build --parallelExecute the application.
./build/CppStarterExecute all registered CTest tests.
ctest --test-dir build --output-on-failureIf you:
- rename or move the project,
- make significant changes to
CMakeLists.txt, - suspect the CMake cache has become stale,
recreate the build directory.
rm -rf build
cmake -S . -B build
cmake --build build --parallelMost development sessions follow a simple cycle.
cmake --build build --parallel
./build/CppStarter
ctest --test-dir build --output-on-failureThis starter project follows a few simple engineering principles.
- Keep the structure standard.
- Keep the implementation elastic.
- Consistency reduces friction.
- Automate repetition.
- Preserve creativity.
- Optimize for Future Francois.
The template is intended to provide a familiar engineering environment while remaining adaptable to projects of any size or domain.
Possible additions include:
- Catch2
- clang-format
- clang-tidy
- Doxygen
- GitHub Actions
- Packaging
- Installation support
- Continuous Integration
This project is released under the MIT License. See the LICENSE file for details.