Skip to content

Commit b0a5ec8

Browse files
authored
Update README.md
1 parent 4bb9c57 commit b0a5ec8

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

README.md

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,53 +15,69 @@
1515
- ✅ C++20 (extendable to C++23)
1616
- ✅ GoogleTest (with `FetchContent`)
1717
- ✅ Sanitizers: AddressSanitizer + UndefinedBehaviorSanitizer
18-
- ✅ Pre-commit hooks + clang-format + clang-tidy
18+
- ✅ Link Time Optimization (LTO) presets
19+
- ✅ Clang-format + Clang-tidy + Pre-commit hook
1920
- ✅ GitHub Actions CI for builds, tests, and formatting
21+
- ✅ Install targets
2022

2123
---
2224

23-
## 🚀 Build & Test
25+
## 🚀 Getting Started
2426

25-
This project uses [CMake Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).
27+
This template uses [CMake Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).
2628

27-
### Build locally
29+
### Build and Test
2830

2931
```bash
3032
cmake --preset gcc-RelWithDebInfo
3133
cmake --build --preset gcc-RelWithDebInfo
3234
ctest --preset gcc-RelWithDebInfo
3335
```
3436

35-
### Run Unit Tests
37+
You can choose from the list of available presets:
38+
```bash
39+
cmake --list-presets
40+
```
41+
42+
#### Enable Sanitizers
43+
Use the special `Sanitize` build type:
44+
```bash
45+
cmake --preset gcc-Sanitize
46+
cmake --build --preset gcc-Sanitize
47+
ctest --preset gcc-Sanitize
48+
```
49+
50+
#### LTO Builds
51+
LTO is enabled via special preset:
52+
```bash
53+
cmake --preset gcc-RelWithDebInfo-lto
54+
cmake --build --preset gcc-RelWithDebInfo-lto
55+
```
56+
57+
#### Testing
3658

3759
Unit tests are enabled by default via the `ENABLE_TESTING` option.
3860
Tests work with all build types, but `Sanitize` is recommended to catch runtime issues (e.g., buffer overflows).
3961

4062
Run tests using the `Sanitize` build type (recommended):
4163
```bash
42-
ctest --preset clang-Sanitize
64+
ctest --preset gcc-Sanitize
4365
```
4466

4567
Tests are auto-discovered via GoogleTest and integrated into CTest.
4668

47-
### Code Style and Lint
69+
### Code Style and Linting
4870

4971
This project uses:
50-
- `.clang-format` for formatting
51-
- `.clang-tidy` for linting
52-
- Pre-commit hook to enforce formatting
72+
- `.clang-format` for formatting (pre-commit hook)
73+
- `.clang-tidy` for linting (static analysis)
5374

54-
To check formatting locally:
75+
Run manually:
5576
```bash
56-
clang-format -i src/*.cpp include/*.hpp tests/*.cpp tests/*.hpp
77+
clang-format -i src/*.cpp include/**/*.hpp tests/*.cpp
78+
clang-tidy src/*.cpp -p build/gcc-RelWithDebInfo
5779
```
5880

59-
### Tips
60-
61-
- All sanitizers are enabled via the `Sanitize` build type.
62-
- CI runs on Clang + GCC using GitHub Actions.
63-
- You can safely override default settings in `CMakePresets.json`.
64-
6581
### Installation
6682

6783
This project supports CMake installation:
@@ -90,6 +106,11 @@ cmake -DCMAKE_PREFIX_PATH=/path/to/install ..
90106

91107
This project is licensed under the [Apache License 2.0](LICENSE).
92108

109+
You are free to use, modify, distribute, and include this code in commercial or open-source projects.
110+
93111
## Contributing
94112

95-
Pull requests are welcome. Please ensure code is formatted and tests pass before submitting.
113+
Pull requests are welcome. Please ensure the following before submitting:
114+
- Code passes all tests
115+
- Code is formatted and clang-tidy clean
116+
= Commits follow clear, atomic changes

0 commit comments

Comments
 (0)