1- # Modern C++ project template !
1+ # Modern C++ Project Template !
22
33[ ![ CI] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/ci.yml/badge.svg )] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/ci.yml )
4- [ ![ clang-format ] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-format.yml/badge.svg )] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-format.yml )
5- [ ![ clang-tidy ] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-tidy.yml/badge.svg )] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-tidy.yml )
4+ [ ![ Clang-Format ] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-format.yml/badge.svg )] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-format.yml )
5+ [ ![ Clang-Tidy ] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-tidy.yml/badge.svg )] ( https://github.com/ramsafin/modern-cpp-project-template/actions/workflows/clang-tidy.yml )
66[ ![ License] ( https://img.shields.io/badge/License-Apache_2.0-blue.svg )] ( LICENSE )
77
88> A modern C++20+ starter project using CMake, GoogleTest, sanitizers, GitHub Actions, and developer tooling.
@@ -34,42 +34,42 @@ cmake --build --preset gcc-RelWithDebInfo
3434ctest --preset gcc-RelWithDebInfo
3535```
3636
37- You can choose from the list of available presets:
37+ You can list available presets:
3838``` bash
3939cmake --list-presets
4040```
4141
4242#### Enable Sanitizers
43- Use the special ` Sanitize ` build type:
43+ Use the special ` Sanitize ` build type to catch runtime issues :
4444``` bash
4545cmake --preset gcc-Sanitize
4646cmake --build --preset gcc-Sanitize
4747ctest --preset gcc-Sanitize
4848```
4949
5050#### LTO Builds
51- LTO is enabled via special preset:
51+ LTO is enabled via a dedicated preset:
5252``` bash
5353cmake --preset gcc-RelWithDebInfo-lto
5454cmake --build --preset gcc-RelWithDebInfo-lto
5555```
5656
5757#### Testing
5858
59- Unit tests are enabled by default via the ` ENABLE_TESTING ` option.
60- Tests work with all build types, but ` Sanitize ` is recommended to catch runtime issues (e.g., buffer overflows).
59+ - Enabled via the ` ENABLE_TESTING ` option (` ON ` by default)
60+ - Works with all build types
61+ - ` Sanitize ` is recommended to detect memory/undefined behavior issues
62+ - Tests are auto-discovered using ` gtest_discover_tests() `
6163
62- Run tests using the ` Sanitize ` build type (recommended) :
64+ Run tests:
6365``` bash
6466ctest --preset gcc-Sanitize
6567```
6668
67- Tests are auto-discovered via GoogleTest and integrated into CTest.
68-
6969### Code Style and Linting
7070
7171This project uses:
72- - ` .clang-format ` for formatting (pre-commit hook )
72+ - ` .clang-format ` for formatting (enforced via pre-commit)
7373- ` .clang-tidy ` for linting (static analysis)
7474
7575Run manually:
@@ -80,16 +80,16 @@ clang-tidy src/*.cpp -p build/gcc-RelWithDebInfo
8080
8181### Installation
8282
83- This project supports CMake installation :
83+ Install includes, libs, and CMake config files :
8484``` bash
8585cmake --preset gcc-RelWithDebInfo
8686cmake --build --preset gcc-RelWithDebInfo
87- cmake --install build/gcc-RelWithDebInfo --prefix install
87+ cmake --install build/gcc-RelWithDebInfo --prefix install # or /usr/local
8888```
8989
9090This will install the compiled library, public headers and CMake config files for ` find_package(...) ` consumers.
9191
92- #### Using in Another Project
92+ #### Consuming in Another Project
9393
9494After installation, your project can consume this library like so:
9595``` cmake
@@ -110,7 +110,7 @@ You are free to use, modify, distribute, and include this code in commercial or
110110
111111## Contributing
112112
113- Pull requests are welcome. Please ensure the following before submitting :
113+ Pull requests are welcome. Please ensure:
114114- Code passes all tests
115115- Code is formatted and clang-tidy clean
116- = Commits follow clear, atomic changes
116+ - Commits follow clear, atomic changes
0 commit comments