I've been using Make for my Emscripten project, but am wanting to move to another build system. I've tried a few, but haven't found any that seems ideal for it yet.
Ideal criteria:
- Out of source builds
- not essential, but would be nicer than all the crud in my current Make setup
- Low boilerplate setup
- I started trying Google's gn, but it looks like you need several other
.gn
files before it will even look at yourBUILD.gn
- I started trying Google's gn, but it looks like you need several other
- Understands C so separate
.o
targets don't need to be specified- Meson had this which I liked
- Syntax that helps you DRY
- My project has one static library and four executables which depend on it (in the future there will probably be more.) Each executable will share many arguments, but also have some modified ones, and some completely unique ones. A build system that has support for dictionaries, or functions with named arguments would be helpful.
- Flexibility for complicated linked arguments, including depending on non-C files
- This is where Meson's big weakness for Emscripten projects was. To tell the emcc linker to include Javascript/JSON files I had to use Meson's "configure" command to copy them to the build directory, after which it could be used in a linker argument. But this seems like a hack, and the docs were really unclear about whether or not it would continue watching for changes to those files. A build system that is designed for additional dependencies at the linker stage would be better.
The last one is the most important, and seems like the biggest complication when moving away from an in-source make setup.
Any recommendations would be much appreciated, especially if you have used it with Emscripten or another compiler with lots of linker arguments.