One more "new" build system after Meson (https://mesonbuild.com/), Scons (https://scons.org/), "Modern" CMake (https://cmake.org/), Waf (https://waf.io/), qmake (http://doc.qt.io/qt-5/qmake-language.html), b2 (https://boostorg.github.io/build/tutorial.html), Jam (https://www.boost.org/doc/libs/1_31_0/tools/build/jam_src/in...), premake (https://premake.github.io/), build2 (https://build2.org/build2-toolchain/doc/build2-toolchain-int...), GYP(https://gyp.gsrc.io/), vcpkg (https://github.com/Microsoft/vcpkg), Bucks (https://buckbuild.com/), Bazel (https://github.com/bazelbuild) and autotools.
It is true that one more was really needed.
One more that has the genetic disease of :
- Trying of being "purely declarative", a thing that at least 4 build system already tried and failed as soon as portability and configuration kicks into the picture.
- Try to merge the concept of build system and package manager: A terrible idea for anything touching C/C++ for reasons discussed 20 times already.
- Use its own syntax and config, because that is really what every developer want to do: Learn how to use a build system zoo for every component they want to use.
Well done guys.
Edit: I forgot some...
Now, granted, only(?) seven of these are build systems proper...
So what is the chance of this happening? Lets look at the list you provided:
- some aren't (C/C++) buildsystems (hackage::bake, bitbake, cake bake).
- some projects are dead (linuxrocks123/bake, openhub.net/bake-build, nsnam.org/bake)
- some projects are almost dead (esrlabs/bake)
That leaves one active project, which is Bakefile, which is not a build system but a makefile generator akin to premake. Bakefile (not bake) has a very different front-end (a bkl file) and different intent, so the potential for confusion is not big. IMO the internet is big enough for two different projects with a similar name :-)
Worst case the similarity in names makes it harder for me to get traction, but that's ok really. For me bake is a means to an end, and by no means the most important thing I'm working on. Would I enjoy it if people adopt it? Sure. But it's not the end of the world if that doesn't happen.
- Bake has been used across platforms for large projects and its declarative approach held up pretty well. Note that being declarative does not mean a configuration cannot contain conditional attributes (which bake supports). You need conditionals for things to work properly on different platforms, like documented here: https://github.com/SanderMertens/bake#can-i-link-with-non-ba...
- I share the frustration, but I do not share your conclusion. Bake takes a refreshing approach to package management in that it doesn't try to do too much, which is perhaps what turned you off in other projects. It doesn't even compete with package managers like brew or vcpkg (which is not a build system, you might want to correct that). I would go into more detail, but then again I've already done so in a few comments, and the README is pretty comprehensive in explaining how it works.
- I did not invent my own syntax, the configuration is written plain JSON. Whether this was a good or bad decision we'll have to see, the jury is still out on that. NPM seems to do alright though.
So far, the people that have actually used bake have been unanimously positive. I can confidently state that the learning curve of bake is much lower than a tool like CMake or premake (which I like), let alone make or autotools. Based on the feedback of Bake's users I decided to spin off the project, as I figured others could benefit from it too. So yes, it is yet another tool, but IMHO there's little harm in that.
For anything which requires a "build" (i.e. transpiling typescript or any form of test integration, minification, ...) you are in the land of "arbitrary scripts doing whatever they like" even worse when getting to C++ modules which default to gyp ...
Autotools on Windows is an absolute nightmare and none of the other build systems have nearly as much support as CMake when it comes to integration with various tooling (as in tools which understand CMake).
I like gn, but it has the annoying problem of needing anything in-tree to be converted to gn.
You could have worded this in a MUCH more pleasant fashion and still gotten your point across. Why did you choose to humiliate?
Could you provide some pointers, ideally a link?
There is some note here
https://mesonbuild.com/Subprojects.html
or here
https://blogs.gnome.org/ignatenko/2015/05/21/meson-and-3rd-p...
Or more recently with Bazel that do the same but arrives to do it much worst:
https://github.com/tensorflow/tensorflow/issues/6210
or
https://archive.fosdem.org/2018/schedule/event/how_to_make_p...
Same with Hunter and CMake External:
https://github.com/ruslo/hunter/issues/296
I have managed an ecosystem of ~250 software for a team in the past.
Software bundling their dependencies are the worst and any package manager will tell you that.
Due to diamond dependency problem, they explode as soon as you try to integrate them into a bigger picture... It is a pure waste of time for every packager.
And I am not even speaking of bug fixes update on dependencies, security update, environment without Internet access or anything like that.... because dependency bundling prevent or make hard all of that.
The comic suggests that bake tries to replace all other build systems with a single, unified approach. That is not the case. Bake is a standalone tool, and does not use or depend on other build systems (unless you consider a compiler a build system).
> The Dutch IRS has a catchy slogan, which goes like this: "Leuker kunnen we 't niet maken, wel makkelijker". Roughly translated, this means: "We can't make it more fun, but we can make it easier".
If only filing taxes in the U.S. was like this…
> Bake does not collect any information when you clone, build or publish projects.
It's sad that this needs to be said.
Firstly, digital filing is the norm and for "simple" returns, just works.
Secondly, if you ever have a question, you can just call the tax authority on their free phone number, and pretty much ask them anything related to individual or business tax returns.
https://github.com/SanderMertens/bake/blob/master/README.md#...
CMake projects allow proper recursive inclusion, so this would be sufficient to include 'bar' and link against it:
add_subdirectory(bar)
target_link_libraries(Foo bar)
...this only assumes that somewhere in the 'bar' directory, 'add_library(bar .....)' is called.Alternately, one can (and often does) use a 'find_package(bar)' call instead of 'add_subdirectory' to pull in a library installed on the system somewhere.
The main difference seems to be that bake is configured with a particular json schema while CMake is configured with scripts written in the CMake language.
I'm skeptical that the json approach stays as same as advertised once large and distributed organizations use the tool seriously. At scale, I expect a bake json to resemble a maven xml, albeit in json.
I'll also note that bake doesn't seem to support a distinct test phase, which will likely cause issues in large organizations; they would need a separate test configuration system on the side somehow.
Regarding find_package; it does sound similar to bake's discovery. There is a not insignificant difference though between how both work in practice. Without going into too much depth, CMake attempts to find a package by looking at (a potentially large number of) system paths. It attempts to adhere as well as possible to the conventions of that platform.
On the other hand, bake recursively searches for projects from where it is being invoked, in addition to looking in a "bake environment". The latter is a self-contained, fixed-format directory structure that contains all projects built with bake. A bake environment is by default stored in a user's $HOME folder, but can be configured to (for example) /opt. Bake environments can be easily moved to different directories and even machines.
There is nothing inherently right or wrong with either approach, but they are certainly different. Bake's approach was designed to accommodate a scenario where a developer is working on a large number of (potentially shared) projects at the same time, and for that it works really well.
Bake has been used for well over 4 years (in various iterations) in big and small organizations. It held up pretty well for large-scale projects, though I should mention that, as with any tool, it can be misused. Big organizations in particular will have to establish conventions and guidelines around using bake, just as they would have to do with any other approach.
In C++ everyone is a combination of developer, tester, package maintainer and deployer. According to my experience, even the best package repos like conan or vcpkg's still lack many important packages and I still need to write my own scripts. The underlying problem is that it takes much more time for a maintainer to create a package description file compared to other languages because of missing dependency list or implicit version requirements, so community (or even a company's funding) simply doesn't work. The end of nightmares can only come from the adoption of modules (expected to appear in C++20) or hiring a number of specialized full-time C++ packagers with fundings at scale of millions from the committee/some organizations/whatever.
Even relatively cleaner languages like Java need fairly involved declarative config files like pom.xml.
> ...only the package maintainer needs to worry about these scripts...
Package maintenance is only one part of the puzzle. There are still analysis, code transformation, documentation generation, and other kinds of automation.
There's also packaging for different ecosystems. Each package manager, Conan, monorepo systems, and each company specific system out there (maybe the most common concern).
A language like python already has standard languages and formats to both keep the number of integration points small and to keep the remaining ones supported.
In other words, I expect project.json to mention Doxygen and clang-tidy and DPKG at some point. Otherwise there will need to be pretty flexible ways to expose bake-deduced data to those tools.
Time will tell whether JSON scales, but so far it has held up pretty well. Bake has been used by small & big organizations, while building large numbers of packages simultaneously (150+). The most complex bake project.json I've seen was still far less verbose than the average CMake file (using CMake as a benchmark since it has been widely adopted).
KVIN: https://github.com/jaroslov/kvin
GRON: I can’t find the spec; sorry.
I've been messing for a while with my own boilerplate C++ project [0], since I got sick of having to recreate the CMake set up for every app I created. It's taken a lot of CMake magic to get it working and I'm still not totally happy with the config using ExternalProject_add to automagically deal with dependencies that aren't present.
I've been evaluating Hunter [1] and wondering whether to step over.
If I understand correctly, the big advantage of Bake is that it completely replaces CMake for dependency management (at least that's what I take away from the readme)?
In my opinion, CMake is best as a (meta)build system, leaving packaging details to a different layer.
A big difference with CMake is that bake stores package binaries, include files and metadata in a $HOME/bake directory. It won't actually install anything to /usr/local (or equivalent), unless you explicitly tell it to. Users typically first build everything to their $HOME/bake folder, and then when they want to make it available for all users, copy the contents of that folder to /opt when distributing the project.
A minor detail: the table under Template Functions is not properly formatted and Github doesn't render it as a table.
You don't need to specify all dependencies "the bake way". If you want to link with a non-bake C library (like pthread or dl), you can configure it like shown here:
https://github.com/SanderMertens/bake#can-i-link-with-non-ba...
It is also possible to wrap existing libraries in bake projects. This section of the README describes how:
https://github.com/SanderMertens/bake/blob/master/README.md#...
- always cross: native builds are just build=host builds.
- preprocesses as separate step efore building