Repo-Init is a powerful, production-ready CMake template designed to kickstart your C++ applications with enterprise-grade features built-in. Say goodbye to boilerplate code and hello to modern, robust software development!
🔧 Requires: C++17 supported compiler
💡 Perfect for: Microservices, CLI tools, system applications, and performance-critical software
|
Automatic minidump generation with Crashpad Never lose critical debugging information |
Multi-output logging with Spdlog File rotation • Syslog • Colorized console |
Sentry • Grafana Loki • Prometheus Real-time monitoring & alerting |
|
|
|
💬 Questions? Issues? Contributions? Feel free to ask, use, and report any bugs you encounter! We ❤️ community feedback.
- What is Repo-Init?
- Table of Contents
- CMake Modules
- Utility Scripts
- Dependencies
- Testing Setup
- Build Targets
- Grafana Integration
Our carefully crafted CMake modules provide powerful build automation:
| Module | 🎯 Purpose | ✨ Benefits |
|---|---|---|
| CodeCoverage | Detects and enables gcovr |
📊 Automatic test coverage reports |
| CompilerSecurityOptions | Enables/Disables secure compiler flags | 🛡️ Hardened binary security |
| Doxy | Finds Doxygen package and prepares docs | 📖 Auto-generated documentation |
| GenerateSymbols | Adds target for symbol file generation | 🔍 Enhanced debugging with minidumps |
| GitVersion | Gets SHA1 hash of current commit | 🏷️ Version tracking and build reproducibility |
| GraphViz | Finds GraphViz and dot executable | 🎨 Visual dependency graphs |
💡 Tip: All scripts should be executed from the top-level directory
| Script | 🚀 Function | 📝 Description |
|---|---|---|
firstName.sh |
Name Changer | Replaces placeholder names throughout the project |
crashpad_manual_upload.py |
Manual Minidump Uploader | Uploads bulk of minidump files in given directory |
dump_syms.py |
Symbol Dumper | Generates symbol files for crash analysis |
|
Built and bundled automatically
|
For building and testing only
Install via package manager (apt/dnf/brew) |
📊 Want to see the full picture? Check out our complete dependency graph!
Our test suite requires some Python dependencies for comprehensive testing. Here's how to set them up:
|
|
| Target | 🚀 Command | 📋 Description |
|---|---|---|
| all | cmake --build . |
Builds the complete project with all components |
| coverage | cmake --build . --target coverage |
Generates comprehensive test coverage reports |
| docs | cmake --build . --target docs |
Creates beautiful documentation with Doxygen |
| dependency-graph | cmake --build . --target dependency-graph |
Visualizes project dependencies with GraphViz |
| package | cmake --build . --target package |
Creates distribution packages (DEB/RPM + systemd service) |
| test | ctest . --parallel |
Runs the complete test suite with GoogleTest |
💡 Pro Tips:
- For packages, specify your preferred format with
-DCPACK_GENERATOR="DEB"or"RPM"- Ensure Python virtual environment is activated before running tests!
Customize your build with powerful CMake configuration options
💡 Important: Re-run CMake configuration (
cmake -B build) after changing any options
|
|
Thanks to our integrated Prometheus server, monitoring your application has never been easier! Get instant insights into your application's performance, health, and behavior.
|
🐛 Report Issues • 💬 Discussions • 🔧 Pull Requests
Made with ❤️ for the C++ community
Star ⭐ this repo if you find it useful!