meson-plus-plus icon indicating copy to clipboard operation
meson-plus-plus copied to clipboard

Generating multiple build types in one project

Open dcbaker opened this issue 3 years ago • 0 comments

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?

dcbaker avatar Nov 30 '22 21:11 dcbaker