| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Modern C++20 project template with CMake, Google Test, and Ninja.
Required:
Optional (targets degrade gracefully if missing):
Google Test is fetched automatically by CMake (no install needed).
make build # generate + build
make test # run all tests
make run # run the applicationCMakeLists.txt # main cmake config
Makefile # convenience wrapper
cmake/ # cmake modules (ClangTools, CodeCoverage)
src/
common/include/ # shared headers
foo/ # library module
include/ src/ tests/
app/ # application
src/
| Target | Description | Requires |
|---|---|---|
| make build | Generate + build | cmake, ninja |
| make rebuild | Clean + build | cmake, ninja |
| make test | Build + run tests via ctest | ctest |
| make run | Build + run application | |
| make clean | Remove build directory | |
| make format | Format code with clang-format | clang-format |
| make format-check | Check formatting without modifying | clang-format |
| make tidy | Run clang-tidy static analysis | clang-tidy |
| make tidy-fix | Run clang-tidy with auto-fix | clang-tidy |
| make coverage | Generate code coverage report | lcov, genhtml |
| make xcode | Generate + open Xcode project | macOS |
Off by default. Enable via CMake options:
cmake -B .build -DENABLE_ASAN=ON # AddressSanitizer (memory errors)
cmake -B .build -DENABLE_TSAN=ON # ThreadSanitizer (data races)
cmake -B .build -DENABLE_UBSAN=ON # UndefinedBehaviorSanitizersrc/mymodule/
CMakeLists.txt
include/mymodule.h
src/mymodule.cpp
tests/
CMakeLists.txt
tests.cpp
Add add_subdirectory(mymodule) to src/CMakeLists.txt.
Update app_binaries in the Makefile if the module produces an executable.
Update the clearly marked PROJECT SETTINGS sections:
Everything else (build targets, cmake modules, test infrastructure) is generic boilerplate.
MIT
| Back | FazBrowse Home | New Git URL |