https://github.com/geugenm/template-cpp-project
Just a template for future projects in c++
https://github.com/geugenm/template-cpp-project
bash clang-format clang-tidy cmake cpp docker doxygen editorconfig template-project
Last synced: 8 months ago
JSON representation
Just a template for future projects in c++
- Host: GitHub
- URL: https://github.com/geugenm/template-cpp-project
- Owner: geugenm
- License: agpl-3.0
- Created: 2023-04-11T14:51:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-01T12:55:09.000Z (8 months ago)
- Last Synced: 2025-02-01T13:36:04.803Z (8 months ago)
- Topics: bash, clang-format, clang-tidy, cmake, cpp, docker, doxygen, editorconfig, template-project
- Language: CMake
- Homepage:
- Size: 131 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# ๐ Modern C++ Project Template
[](https://en.cppreference.com/w/cpp/compiler_support)
[](https://cmake.org)
[](https://www.gnu.org/licenses/agpl-3.0.en.html)
[](https://www.docker.com)
[](https://github.com/geugenm/template-cpp-project)## ๐ 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
- **๐ณ Docker Support**: Pre-configured containerization
- **๐ป IDE Compatibility**: Works with QtCreator, CLion, Visual Studio, KDevelop
- **๐ Cross-Platform**: Linux, Windows, macOS support
- **๐๏ธ CMake-Driven**: Streamlined CI/CD configuration## ๐ง Prerequisites
- `cmake 3.25.0+`
- `C++ compiler with C++23 support`
- `ninja`
- `(optional) cmake/cfg/*.cmake tools`## ๐พ Installation
### ๐ macOS
```bash
# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"# Dependencies
brew install cmake llvm doxygen
```### ๐ช Windows
```powershell
# 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
```bash
sudo apt update
sudo apt install cmake g++ doxygen
```#### Fedora
```bash
sudo dnf check-update
sudo dnf install cmake gcc-c++ doxygen
```## ๐ ๏ธ Build & Deployment
### Build Project
```bash
cmake --preset=release .
cd build/release
cmake --build . --config release
```### Run Tests
```bash
cd build/release
ctest --output-on-failure
```### Docker Build
```bash
docker build -t my-image -f docker/Dockerfile .
```## ๐ Documentation
```bash
cd build/release
cmake --build . --target doxygen# Browse documentation
cd build/release/docs/doxygen/html
python -m http.server 8080
```## ๐ง Roadmap
- [ ] Add Android build support
## ๐ค Contributing
Contributions are welcome! Fork the repository and submit a pull request.
## ๐ License
[AGPL-3.0 License](license)
## ๐ Acknowledgments
Thanks to CMake, CTest, and the open-source community.