dcbaker / meson-plus-plus

An experimental and incomplete implementation of Meson in C++, for solving Meson's bootstrapping issue.
Apache License 2.0
45 stars 7 forks source link

Generating multiple build types in one project #118

Open dcbaker opened 1 year ago

dcbaker commented 1 year ago

I was thinking about this because Visual Studio supports this natively. It's a really hard problem for the reference implementation because of it's implementation details, but I think we could actually solve it fairly easily:

  1. hold off on lowering away buildtype, b_vscrt, b_debug, b_optimisation (and possibly a few others) as long as possible
  2. clone the IR into 4 separate IRs, one for each buildtype
  3. rename all of the targets into foo_{buildtype}
  4. set the default all in ninja to be all_{buildtype}, but the user can run ninja -C builddir all_{different_build_type} to get that instead

profit?