Skip to content

e-gleba/template-cpp-project

πŸš€ Modern C++ Project Template

C++ Standard CMake License

🌟 Features

  • πŸ”¬ C++23 Ready Presets: Leverage cutting-edge C++ features
  • πŸ›‘οΈ Code Quality Tools: Integrated targets for maintaining high standards
  • πŸ“¦ CPM Package Management: Simplified dependency handling
  • πŸ“„ Doxygen Configuration: Seamless documentation generation
  • πŸ§ͺ CTest Integration: Straightforward testing setup (doctest + androidTest)
  • 🐳 Docker Support: Pre-configured containerization
  • πŸ’» IDE Compatibility: Works with QtCreator, CLion, Visual Studio, KDevelop
  • 🌐 Cross-Platform: Linux, Windows, Android, macOS support
  • πŸ—οΈ CMake-Driven: Streamlined CI/CD configuration

🚧 Prerequisites

  • cmake 3.30.0+
  • C++ compiler with C++23 support
  • ninja
  • (optional) cmake/cfg/*.cmake tools

πŸ’Ύ Installation

🍎 macOS

# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Dependencies
brew install cmake llvm doxygen

πŸͺŸ Windows

# Chocolatey
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

# Dependencies
choco install cmake llvm visualstudio2019buildtools doxygen

🐧 Linux

Ubuntu/Debian

sudo apt-get update
sudo apt-get install cmake g++ doxygen llvm clang-tools python-devel

Fedora

sudo dnf check-update
sudo dnf install cmake gcc-c++ doxygen llvm python-devel

πŸ› οΈ Build & Deployment

Build Project

cmake --preset=gcc .
cd build/release
cmake --build . --config gcc

Run Tests

cd build/gcc
ctest --output-on-failure

Docker Build

docker build -t my-image -f docker/<desired_os>.Dockerfile .

πŸ“š Documentation

cd build/gcc
cmake --build . --target doxygen

# Browse documentation
cd build/gcc/docs/doxygen/html
python -m http.server 8080

🚧 Roadmap

  • develop

πŸ“– Learning Resources

Essential Reading

Technical References

About

Just a template for future crossplatform projects in c++

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •