A gn, ninja, and googletest-based C++ project template.
To build, you'll need gn, ninja, and a clang build toolchain installed on your system.
First, clone the repo. Then, initialise and fetch git submodules:
# Initialise local configuration file.
git submodule init
# Fetch data from the buildroot submodule.
git submodule update
To update the git submodules to a newer commit, simply run:
git submodule update --remote
First, generate the ninja build files under the out directory:
gn gen --args=is_debug=true out/debug
gn gen --args=is_debug=false out/release
To build and run the unit tests, run:
ninja -C out/debug src:foo_tests
./out/debug/foo_tests
To build and run the binary:
ninja -C out/debug src:foo
./out/debug/main