Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CppStarter

A reusable, cross-platform C++20 starter project using modern CMake.

Keep the structure standard. Keep the implementation elastic.


Overview

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.


Features

  • 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

Requirements

  • CMake 3.20 or newer
  • A C++20 compatible compiler

Supported compilers include:

  • Apple Clang
  • LLVM Clang
  • GCC
  • Microsoft Visual C++

Project Structure

cpp-starter/
│
├── build/              # Generated by CMake (not committed)
├── docs/
├── include/
├── src/
├── tests/
│
├── .gitignore
├── CMakeLists.txt
└── README.md

First-Time Configuration

Generate the build directory.

cmake -S . -B build

Build

Compile the project.

cmake --build build --parallel

Run

Execute the application.

./build/CppStarter

Run Tests

Execute all registered CTest tests.

ctest --test-dir build --output-on-failure

Reconfigure

If 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 --parallel

Daily Development Workflow

Most development sessions follow a simple cycle.

cmake --build build --parallel

./build/CppStarter

ctest --test-dir build --output-on-failure

Design Philosophy

This 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.


Future Improvements

Possible additions include:

  • Catch2
  • clang-format
  • clang-tidy
  • Doxygen
  • GitHub Actions
  • Packaging
  • Installation support
  • Continuous Integration

License

This project is released under the MIT License. See the LICENSE file for details.

About

Reusable cross-platform C++20 starter project using modern CMake.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages