|
Boost-Build : |
From: Robert Ramey (Ramey_at_[hidden])
Date: 2004-12-24 02:10:51
OK - now for a really dumb quesiton:
serialization extras looks like it should be invoked with one or two
arguments. What arguments should be passed to it?
Robert Ramey
David Abrahams wrote:
> TEMPLIE Cédric wrote:
>> Robert Ramey wrote:
>>> in my test Jamfile I would like something like:
>>>
>>>
>>> if being built for static library
>>> run
>>> <lib>libboost_serialization.lib
>>> etc.
>>>
>>> while if being built for dynamic runtime
>>> run
>>> <lib>libboost_serialization.lib
>>> etc.
>>> <define>BOOST_DYN=1
>>>
>>> It is not at all clear to me how to accomplish this. It looks to me
>>> that run (and other build commands) build for all the combinations
>>> of targets/variants specified.
>>>
>>> Robert Ramey
>>>
>>
>> Hi,
>>
>> Have you tried
>> <link>static:<define>BOOST_DYN=1
>> in the requirements of your build ?
>>
>> The line mean that if we are linking statically, then define
>> BOOST_DYN=1.
>
> That's BBv2 syntax; Robert is using BBv1.
> Robert, the way to handle this is with property rules:
>
> rule serialization-extras ( toolset variant : properties * )
> {
> if <target-type>dll in $(properties)
> {
> properties += <define>BOOST_DYN=1
> }
> return $(properties) ;
> }
>
> Now add "serialization-extras" to your target's requirements.
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