Boost logo

Boost-Build :

Subject: Re: [Boost-build] address-model and optional feature
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-09-04 08:46:30


On Wednesday 01 September 2010 11:51:51 Renaud Lepère wrote:

>
> I'm trying to install built libraries somewhere depending if this is 32
> bits or 64 bits binaries. So i try to do something like this:
>
> install myinstall
> : myproject
> : <address-model>32:<location>../build/bin
> <address-model>64:<location>../build/bin64 ;
>
> But sometimes, i don't specify address-model (this leads to a 32bit
> build in this case) but in this case the location of the myinstall rule
> is not set correcty?
>
> I have seen under buildin.jam that the address-model is an optional feature.
>
> feature.feature address-model : 16 32 64 32_64 : propagated optional ;
>
> The documentation (*) tells that the default value for address-model is
> 16bits ? What is the good way to slove my problem ?
>
> Should i say something like ?
>
> install myinstall
> : myproject
> : <location>../build/bin
> <address-model>32:<location>../build/bin
> <address-model>64:<location>../build/bin64 ;

Renaud,

unfortunately, there's no good solution. Optional features do not have any
value by default, and default value of address-model is a bit tricky --
because a given compiler can have whatever default it wishes, and generally
we don't know it.

You can add <address-model>32 to the default-build attribute in Jamroot to
make results somewhat more consistent.

HTH,

--
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

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