Skip to content

fng97/cpp-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Template

A zero-dependency C++ project template. Zig replaces the usual tools: gcc, cmake, ninja, ccache.

Setup

Create a repo from this template using Use this template above, or clone the repo:

$ git clone https://github.com/fng97/cpp-template.git

Install Zig using the polyglot script (copied from TigerBeetle):

$ ./zig/download.ps1  # linux/macos
$ .\zig\download.ps1  # windows

Entrypoint

On 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

Bundled Packages

This project includes three common packages: googletest, Google Benchmark, and clang-format. These are installed by the build system.

About

Quick, easy C++ development environment

Resources

License

Stars

Watchers

Forks

Contributors