3 ms·
It does not satisfy all of the items on the author's wish list, but I have used and enjoyed Bazel[1] as perhaps the nearest build system in existence that provi
by duality 9y ago
It does not satisfy all of the items on the author's wish list, but I have used and enjoyed Bazel[1] as perhaps the nearest build system in existence that provides a notion of package management to C++. It does not hold prebuilt binaries to satisfy dependencies. But it does cache builds.
Nor does Bazel use C++ syntax to describe the build, instead using a variant of Python called Skylark, but this feels (to me) much less onerous to pick up than the custom scripting language CMake uses.
Bazel also provides a notion of visibility of dependencies that allow you in effect to control which build targets are exposed to other targets as allowed dependencies. And allows the build tool to specify a toolchain (compiler, linker, etc.) and machine architecture. This information is used when building all the dependencies, which in effect satisfies the author's request for compatibility between packages. You might even argue that a (caching) build from source may be better than attempting to serve prebuilt binaries.
[1] https://bazel.build https://bazel.build
- chuckcode 9y ago+1 for bazel. It also scales to large builds and handles java as well. We've seen big decreases in build times by using it as it does caching, parallel execution and good dependency analysis. Getting up to speed can take a little doing though as the original docs weren't great and there are some counter intuitive things about it. I think the docs are improving but some things a little odd like everything gets dumped into ~/.cache/bazel without any command line option to change [1]. Feels like the first time I used git where you suspect that the authors designed it to be difficult to keep the lazy away. https://docs.bazel.build/versions/master/output_directories.html https://docs.bazel.build/versions/master/output_directories....
- ridiculous_fish 9y agoWhat software do you build with bazel? How do you distribute it? Would you use it for an open source project? It feels onerous to ask users and contributors to install a moderately esoteric build tool (which in turn requires Java) to build a C++ project.
- chuckcode 9y agoI currently use it for java and c++ builds inside a largish tech company. Build systems are definitely not one size fits all though so I would encourage you to pick one that meets needs of your project. If you want to build for different platforms like unix, windows, iOS, android and have a big complicated build then I'd encourage you to check out bazel. If your project needs are pretty simple I'd say just start off with a simple makefile.
- oscargrouch 9y agoFor C++ theres also 'GN' from Chrome, that is inspired in Bazel, and generate ninja build files. You can also specify a toolchain, have custom actions for asset or code generation, etc.. GN itself is in C++, unlike the older build system for chrome 'GYP', and it produces a binary tool, that can process meta build file with a syntax very similar to Bazel. https://chromium.googlesource.com/chromium/src/tools/gn/ https://chromium.googlesource.com/chromium/src/tools/gn/ https://chromium.googlesource.com/chromium/src/+/lkgr/tools/gn/docs/quick_start.md https://chromium.googlesource.com/chromium/src/+/lkgr/tools/...
- duality 9y agoI encountered GN for the first time while looking at Google's nascent Fuchsia OS. It looked interesting but I have dug further.
- tomjakubowski 9y agoI would be wary of depending on gn. Google is really only interested in supporting it for their open source projects.