i've been working on meson/ninja/cmake support for Evergreen. meson and cmake do the configure-like work and generate instructions for ninja, and then ninja does the actual building.
two problems:
1. neither meson nor cmake have defaults for their output directories. Android traditionally used "out" for such things, so i've found myself automatically telling ninja and/or cmake to put everything in "out". (strictly, you don't have to tell cmake where to put things, but then it spews a ton of crap in your top-level directory, rather than neatly keeping it in its own directory. for my money, that's significantly worse.) so this means (a) i can't tell whether you've already run meson/cmake so i always run them first and then call ninja, which makes them whine that they've already been run and that just running ninja will cause them to reconfigure themselves if the meson.build/CMakeLists.txt file has changed, and (b) i don't know what to add to the list of directories to be ignored.
options would seem to be:
* have Evergreen make an executive decision about what your directory should be called. this leads to the sub-problem of "what should that be?". "out" seems fine to me, but does anyone have a directory called "out" in their tree? an internal google code search says "yes". so restrict it to the workspace root? (i don't think FileIgnorer supports such specificity.) so maybe something like ".out" and just take advantage of all dot directories being ignored? (tutorials seem to like "build", but that's a pretty common name for human-generated build-related stuff too.)
* have Evergreen insist that you lead by example; it could look for */build.ninja or */compile_commands.ninja from the directory in which it finds the meson.build file, for example. but that doesn't actually help in the case where it makes sense to choose a custom directory name, because that's when you're keeping (say) debug and release builds separate. and then how does Evergreen know which to build? (theoretically it could construct a list of all the options, but this is starting to seem like a lot of work for something that doesn't have a single user yet.)
2. because both meson and cmake generate the ninja instructions in a subdirectory, all the build failure messages have filenames like ../src/libfoo/bar.c because they're relative to where the ninja instructions live, not the root of the tree. an obvious hack would be to print fake `make: Entering directory` messages, but that seems kind of gross. i don't have a better idea atm, though, so i'm thinking of maybe just relaxing the regular expression to allow "ninja" as well as "make" and printing out the fake message.
any opinions?
--