Boost logo

Boost-Build :

Subject: [Boost-build] Defining variant with toolset version
From: Johan Larsson (hnefi.mail_at_[hidden])
Date: 2009-09-08 07:08:03


Hello.

I'm trying to convert a very large Make system to bjam. The project in
question has several (8+) targets, divided into three toolset groups;
gcc-based cross compiler A, gcc-based cross compiler B and plain gcc on
host. The reason for the two cross compilers A and B is that the system
supports several hardware architectures.

So I tried defining a set of variants, like so:
variant v0 : <debug-symbols>on <optimization>space <inlining>off
<threading>multi <toolset>gcc ;
variant v1 : v0 : <toolset>gcc-A ;
variant v2 : v0 : <toolset>gcc-B ;
variant v3 : v2 : ;

Obviously, all names are simplified; you get the idea. This layout, if it
worked, would allow me to specify special conditions based not only on
variant, but on target architecture when needed (and it is necessary to do
so in hundreds of places throughout the code).

The problem:
When I try to build a specific variant, say v1, it builds not only for
gcc-A, but also gcc-B. Likewise, v2 and v3 builds with both toolsets. What I
want is for v1 to only invoke gcc-A, v2 only to invoke gcc-B, etc.

Is there a good way to achieve the desired behaviour?

Thank you for any help.



Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk