A gn, ninja, and googletest-based C++ project template.
要求版本clang-10版本以上
sudo apt-get install clang-10 ninja
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 build and run the unit tests, run:
gn gen --args="is_debug=true" out/debug(release版本:gn gen --args=is_debug=false out/release)
ninja -C out/debug src:all_tests
./out/debug/all_tests
ninja -C out/debug/ asm_all
./out/debug/asm_helloworld