A zero-dependency C++ project template. Zig replaces the usual tools: gcc,
cmake, ninja, ccache.
Create a repo from this template using Use this template above, or clone the repo:
$ git clone https://github.com/fng97/cpp-template.gitInstall Zig using the polyglot script (copied from TigerBeetle):
$ ./zig/download.ps1 # linux/macos$ .\zig\download.ps1 # windowsOn Windows, use .\zig\zig.exe instead of ./zig/zig.
$ ./zig/zig build --help
Usage: /path/to/zig/zig build [steps] [options]
Steps:
install (default) Copy build artifacts to prefix path
uninstall Remove build artifacts from prefix path
run Run the main executable
gtest Run googletest
gbench Run google benchmark
test Run all checks
fmt Format C/C++ files with clang-format
$ ./zig/zig build test # runs tests, benchmarks, and checks formatting
This project includes three common packages:
googletest, Google
Benchmark, and
clang-format. These are installed by the build system.