You should definitely take a look at bazel. This is not say bazel is better than the one you wrote but cleary bazel is becoming a industry standard making other build tools obsolete.
The de facto industry standard is cmake, I have never even seen bazel in the wild and I work across many companies on big C++ code bases. I primarily use meson, and have even seen some cmake projects moved to meson, but I am under no illusions about it replacing cmake.
Ok, I will look at it, as far as I know, cmake seems to be more popular than bazel. At least I rarely see projects that use bazel, although I don’t like the syntax of cmake very much.
I'm sure once it works, bazel is great and all, but Windows seems to have been an afterthought (which makes that whole "industry standard" thing a bit "complicated").
The hoops one has to jump through to get it running on Windows are a joke (TBH, the list of prerequisites and potential issues looks like a UNIX programmer was confronted for the first time with Windows):
Bazel, like most Google open source projects, has a strong focus on Google's internal needs. Another similar Bazel surprise is how many hoops you have to jump through for the rare task of... debugging a cc_binary on macOS: https://github.com/bazelbuild/bazel/issues/2537
I’d say it is Apple’s fault, not Google’s: Bazel correctly does not include absolute paths into binaries (Bazel focuses on build reproducibility which is very good for caching and debugging of builds), and Apple toolchain does not provide convenient way to work with such binaries.
As a user, I couldn't care less. My goal is to build my application in debug mode. If the build system's view of the world is incompatible with the actual world, is that a failure of the world or the build system? At the end of the day, I still need to get my debug build working...
> Bazel, like most Google open source projects, has a strong focus on Google's internal needs
This is only partially true: internally they have Blaze, which is a different version of Bazel. I think Bazel is just not yet mature enough, and they released version 1.0 too early.
CMake today is autotools yesterday: too buggy, too unreliable, fragile, slow. Bazel is properly made build system.
Basically, CM does not guarantee correct incremental builds, Bazel does (I had to kill CM cache thousands of times to make sure everything is rebuilt correctly after changes in CMake definitions). CMake is incompatible with effective distributed building (you have to use cpp and distcc), Bazel is designed with distributed in mind. CMake is incompatible with effective caching (you have to use suboptimal ccache), Bazel has proper caching based on input checksums. CMake macros are pain, Bazel macros and custom rules are nice. And so on.