Boost logo

Boost-Build :

From: Ian Fasel (ianfasel_at_[hidden])
Date: 2006-04-18 17:37:31


When on darwin, some targets in my project require the 3.3 version of
gcc, while others require the 4.0 version. On linux, they can all be
built with the same gcc.

If my user-config.jam is:
        using darwin : 3.3 : g++-3.3 : <cxxflags>"-fcoalesce-templates" ;
        using darwin : 4.0 : g++-4.0 ;
then I can make two targets using the same sources, with different
names, and use target alternatives in my Jamfiles, e.g.,
        lib mpisearchX-3.3 : mpisearchX.cpp : <toolset>darwin-3.3 ;
        lib mpisearchX-4.0 : mpisearchX.cpp : <toolset>darwin-4.0 ;
Targets that must always be built with gcc-3.3 can specify a
particular version of this library, and also can point to a specific
copy of my pre-built boost binaries --one which was built with
gcc-3.3, the other with gcc-4.0.

First, this is inelegant because those targets that don't need to
care what toolset they get built with still have to manually specify
which copy of the library, and the boost libraries, to link to.

Second, and more importantly, this breaks the ability to build on
linux, since some targets now don't have any rule for how to be built
with plain old gcc, and when user-config.jam only has "using gcc ;",
it complains that it doesn't know what the darwin-4.0 toolset is.

Adding additional target alternatives seems to make builds on linux
work:
        lib mpisearchX-3.3 : mpisearchX : <toolset>gcc ;
        lib mpisearchX-4.0 : mpisearchX : <toolset>gcc ;
But using this Jamfile on darwin results in "no alternative target
could be found" errors in bjam. Should it really die when a toolset
that isn't defined in the user-config.jam appears? How can I get
around this?

Thanks,
-Ian


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