For simplicity let us say that I want to build two concrete targets, one for linux, and one cross-compiled for windows. To that end, I have two gcc inits, one using the default compiler and one using gcc-mingw32. If I run b2 twice, both work:
b2 toolset=gcc-mingw32 target-os=windows
How do I run them together?
If I use:
b2 toolset=gcc toolset=gcc-mingw32 target-os=windows
it builds the two desired targets but also tries for gcc with windows flags and gcc-mingw32 with linux flags.
I do not see a way to specify that a given gcc toolset should only be used for a particular target-os (e.g putting <target-os>windows in the options.
I tried what was in Vladimir's Boost.Build System paper:
b2 toolset=gcc -- toolset=gcc-mingw32 target-os=windows
but that only builds whatever comes before the dashdash.