Boost logo

Boost-Build :

From: Foster Brereton (fosterb.boost_at_[hidden])
Date: 2006-03-09 12:36:33


Hey all,

In our project we primarily build both Mac OS X (PPC and MacTel) as
well as MSVC. In order to accomodate the ability to build native, ppc,
i386 or fat binaries for the Mac platform, we added an "arch" flag to
the darwin.jam file:

feature arch : native ppc i386 fat : composite propagated ; # We don't
turn on link-incompatible for now;
flags darwin.compile OPTIONS <arch>native : -isysroot
/Developer/SDKs/MacOSX10.4u.sdk ;
flags darwin.compile OPTIONS <arch>fat : -arch i386 -arch ppc
-isysroot /Developer/SDKs/MacOSX10.4u.sdk ;
flags darwin.compile OPTIONS <arch>i386 : -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk ;
flags darwin.compile OPTIONS <arch>ppc : -arch ppc -isysroot
/Developer/SDKs/MacOSX10.4u.sdk ;

Now we can specify the architecture for which we want to build our Mac
binaries. There was
much rejoicing.

Now what we'd like to do is require that the release variant always
build in fat mode, so I specified this in my project requirements:

project top
 : requirements
# [snip]
    <toolset>darwin,<variant>release:<arch>fat
# [snip]
 ;

Again, much rejoicing ensued.

The problem we are having comes when I now try to build on any other
platform that knows nothing about the <arch> flag (MSVC, for example).
Building on MSVC looks at the top project and, though it is behind a
<darwin> grist conditional, sees <arch> and doesn't recognize it.
Previously we were doing some local variable settings to work around
this limitation, but are wondering if there's a more elegant solution
to specifying <arch> for darwin builds and having other compilers pass
it over. Thoughts?

Blessings,
Foster

--
Foster T. Brereton - Computer Scientist
Software Technology Lab, Adobe Systems Incorporated
fbrereto_at_[hidden]   --   http://opensource.adobe.com

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