An open API service indexing awesome lists of open source software.

https://github.com/korbolkoinc/uuids

High performance C++ uuid generator
https://github.com/korbolkoinc/uuids

aes clang clang-format clang-tidy cmake cpp cpp20 hardware-acceleration random-generation rdseed simd simd-instructions simd-intrinsics uuid uuid-generator uuid-v4 uuids uuidv4

Last synced: 16 days ago
JSON representation

High performance C++ uuid generator

Awesome Lists containing this project

README

        

# πŸ“¦ Modern C++ Project Template

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
![C++](https://img.shields.io/badge/C++-20-blue.svg)
![CMake](https://img.shields.io/badge/CMake-3.16%2B-blue)

A modern, feature-rich, customizable C++20 project template

## ✨ Features

- πŸ”„ Modern CMake (3.16+) setup
- πŸš€ C++20 standard
- πŸ“š Google Test integration
- πŸ“ Comprehensive documentation structure
- πŸ§ͺ Example code
- πŸ› οΈ Out-of-the-box compiler warnings
- πŸ” Code sanitizers
- πŸ“Š Code coverage support
- πŸ“‹ Static analysis support
- πŸ”„ Continuous Integration ready
- πŸ“¦ Package management support
- 🚒 Installation and export targets

## πŸ“‹ Requirements

- CMake 3.16 or newer
- C++20 compatible compiler
- Git

## πŸš€ Quick Start

```bash
# Clone the repository
git clone https://github.com/hun756/CPP-Starter-Template.git my-project
cd my-project

# Create build directory
mkdir build && cd build

# Configure
cmake ..

# Build
cmake --build .

# Run tests
ctest

# Run executable
./bin/cpp_project_template
```

## πŸ“Š Project Structure

```
my-project/
β”œβ”€β”€ CMakeLists.txt # Main CMake configuration
β”œβ”€β”€ cmake/ # CMake modules and utilities
β”‚ β”œβ”€β”€ CompilerWarnings.cmake
β”‚ β”œβ”€β”€ Sanitizers.cmake
β”‚ β”œβ”€β”€ StaticAnalyzers.cmake
β”‚ β”œβ”€β”€ LTO.cmake
β”‚ β”œβ”€β”€ Packaging.cmake
β”‚ β”œβ”€β”€ FindGTest.cmake
β”‚ β”œβ”€β”€ FindGBenchmark.cmake # Benchmark iΓ§in eklendi
β”‚ └── configs/ # Configuration templates
β”œβ”€β”€ include/ # Public header files
β”‚ └── myproject/
β”‚ β”œβ”€β”€ ModuleA.h
β”‚ └── ModuleB.h
β”œβ”€β”€ src/ # Source files
β”‚ β”œβ”€β”€ ModuleA.cpp
β”‚ β”œβ”€β”€ ModuleB.cpp
β”‚ └── main.cpp
β”œβ”€β”€ test/ # Test files
β”‚ β”œβ”€β”€ CMakeLists.txt
β”‚ β”œβ”€β”€ ModuleATest.cpp
β”‚ └── ModuleBTest.cpp
β”œβ”€β”€ bench/ # Benchmark files
β”‚ β”œβ”€β”€ CMakeLists.txt
β”‚ β”œβ”€β”€ StringProcessorBench.cpp
β”‚ └── CalculatorBench.cpp
β”œβ”€β”€ examples/ # Example programs
β”‚ β”œβ”€β”€ CMakeLists.txt
β”‚ β”œβ”€β”€ example1.cpp
β”‚ └── example2.cpp
β”œβ”€β”€ docs/ # Documentation
β”‚ β”œβ”€β”€ CMakeLists.txt
β”‚ └── Doxyfile.in
β”œβ”€β”€ .clang-format # Formatting configuration
β”œβ”€β”€ .clang-tidy # Static analysis configuration
β”œβ”€β”€ .gitignore
└── README.md
```

## πŸ”§ Build Options

| Option | Default | Description |
|----------------------|---------|-----------------------------------------|
| BUILD_SHARED_LIBS | OFF | Build shared libraries |
| BUILD_EXAMPLES | ON | Build example programs |
| BUILD_TESTS | ON | Build tests |
| BUILD_BENCHMARKS | ON | Build benchmark programs |
| ENABLE_COVERAGE | OFF | Enable coverage reporting |
| ENABLE_SANITIZERS | OFF | Enable sanitizers in debug builds |
| ENABLE_PCH | OFF | Enable precompiled headers |
| ENABLE_LTO | OFF | Enable Link Time Optimization |
| ENABLE_CPPCHECK | OFF | Enable static analysis with cppcheck |
| ENABLE_CLANG_TIDY | OFF | Enable static analysis with clang-tidy |

Example usage:

```bash
cmake .. -DBUILD_SHARED_LIBS=ON -DENABLE_SANITIZERS=ON
```

## πŸ“š Documentation

Generate documentation with Doxygen:
```bash
cmake --build . --target docs
```

Create distributable packages:
```bash
cmake --build . --target package
```

This project can be easily integrated in other CMake projects:

```cmake
find_package(cpp_project_template REQUIRED)
target_link_libraries(your_target PRIVATE cpp_project_template::cpp_project_template)
```

## 🀝 Contributing

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/my-feature`
3. Commit your changes: `git commit -am 'Add my feature'`
4. Push to the branch: `git push origin feature/my-feature`
5. Submit a pull request

## πŸ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.