Some of you may ask why to use Bazel to build your project, aren't there already in-place solutions with CMake examples? And, to be honest, I thought the same, but in the end two major factors prevailed - curiosity and challenge! Also, as Bazel is slowly prying around the corner to be a popular build system, the syntax is more intuitive, readability is high and it's well documented on their official sites (but misses more examples IMHO). If you're interested what the cons and pros for Bazel against CMake are you can look up this page and check it in detail.
First of all, you need Bazel installed on your system. Bazel's documentation is generous in these manners and you can look up the installation page for your OS and or, in our case, it's