jimporter / bfg9000

bfg9000 - build file generator
https://jimporter.github.io/bfg9000
BSD 3-Clause "New" or "Revised" License
76 stars 21 forks source link

Migrate commonly used features from other build systems #60

Closed ghost closed 8 years ago

ghost commented 8 years ago

The system looks promising but some key feature is still missing. Please take a look at meson build system. It has some neat features. I prefer the code structure and implementation of bfg, but meson has some really cool feature I'd like to see in bfg:

jimporter commented 8 years ago

Thanks for the report!

I've actually looked at Meson before. Part of why I chose to write my own instead of contributing to Meson is that we have some fundamental differences in how builds are structured.

I'll probably split this apart into multiple issues for easier tracking, but to quickly address each of your points:

  1. Configuration is technically supported already, but you currently need to set environment variables to communicate with the build.bfg file. I have some thoughts about allowing command-line arguments to the bfg9000 command (especially to support things like --enable-shared and --enable-static for libraries), but that's a relatively low priority since the feature technically works. It could probably stand to be documented better, though!
  2. Dependency handling is supported as well, though bfg calls them "packages" (a "dependency" in bfg is more like a Makefile dependency). 0.1 supports pulling packages from the vaguely-defined "system" directories (on GCC-like compilers, whatever $CC -print-search-dirs reports) and boost libraries, but the soon-to-be-released 0.2 also supports pkg-config. Docs are here: https://jimporter.github.io/bfg9000/user/reference/#package-resolvers
  3. Unity builds are an interesting idea, but probably not one I'll directly support anytime soon. However, I do plan to add the ability to create arbitrary build steps, and it should be straightforward to use that to create a unity build.
  4. Pre-compiled headers would be useful, but I don't use them often, so I haven't really thought about how they should work. If you have any specific ideas here, I'd be happy to hear them.
  5. Docs are a continual work-in-progress. If there are any things you think I'm missing in particular, let me know and I'll try to add them. Pretty much all the public API should already be documented, although it might be too brief in some places.
jimporter commented 8 years ago

Ok, I've split all of these out into separate issues. If I missed something, just let me know. Thanks again!