Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-20 10:01:54

Vladimir Prus <ghost_at_[hidden]> writes:

> Hi Alexander,
>> I want to use bjam v2 for my projects.
>> I must be able to compile it on a Linux-machine or a Sun-machine, with
>> 32bit or 64bit, multithreaded or singlethreaded, with cc or gcc
>> compiler, and of course debug or release. For each combination I'd
>> like to have a different build directory.
>> Bjam solves automatically half of my problems:
>> multithreaded/singlethreaded, cc/gcc, debug/release.
>> But how can I force different directories for linux/sun and 32/64bit?
> I think for 32/64 thing, the right approach is to improve the toolsets. Just
> add
> feature address-mode : 32 64 : propagated ;
> to builtin jam and lines like
> flags gcc.compile OPTIONS <address-mode>64 : -the-right-switch ;
> to gcc.jam and sun.jam. As soon as you get it working, send a patch and I'll
> include this in CVS.
> As for linux/solaris.... I'd suggest, as the first step, putting this into
> your project-root.jam:
> local a = [ modules.peek feature : <os>.attributes ] ;
> modules.poke feature : <os>.attributes : $(a) symmetric ;
> this will cause Boost.Build to always include the value of the "os" feature in
> build path. We probably need a cleaner way to accomplish this task but the
> main idea will remain the same.

Seems to me that the os feature should not be symmetric. Instead it
should have a default value of "native" or "host". You're only likely
to _explicitly_ build for win32 or linux or whatever if you're
interested in cross-compilation. That way the majority of users don't
have to see the OS in subvariant paths.

Dave Abrahams
Boost Consulting

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at