Bazel boilerplate with C++ and GoogleTest.
First, make sure you have Bazel installed.
bazel build :all
bazel run :hello_main
bazel test --test_output=all :all
Because we are using Bazel, clangd
autocomplete in Neovim doesn't know where to find the headers. To fix it, I'm using Hedron's Compile Commands Extractor for Bazel.
Execute the following command to fix autocomplete when new dependencies are installed:
bazel run @hedron_compile_commands//:refresh_all
- Bazel as the build tool.
- Google Test for testing.
- Abseil as an opensource collection of C++ libraries.
- Bazel Compile Commands Extractor to support autocompletion in Neovim and IDEs.