Boost logo

Boost-Build :

Subject: Re: [Boost-build] [boost-build] conditional linking
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-10-09 08:43:13


On Wednesday 08 October 2008 22:38:59 Andy Tompkins wrote:
> Hi,
>
> I have a library that I am working on getting into boost. It can be
> found in the Boost Vault - uuid_v12.zip
> http://www.boostpro.com/vault/index.php?action=downloadfile&filename=uuid_v12.zip&directory=&
>
> My test, test_serialization.cpp, eliminates code that use wide strings
> on
> platforms that don't have wide string support, using
> BOOST_NO_STD_WSTREAMBUF. Sadly my jamfile
> still says to link with boost_wserialization (as well as
> boost_serialization). How can I have my jamfile link to
> boost_wserialization only when it is available?
>
> My jamfile.v2 contents:
> ----------
> import testing ;
>
> project
> : requirements
> <include>../../..
> ;
>
> test-suite "uuid"
> : [ run test_uuid.cpp ]
> [ run test_serialization.cpp
> ../../serialization/build//boost_serialization
> ../../serialization/build//boost_wserialization ]
> [ run test_sha1.cpp ]

Is your testing testing both narrow and wide serialization?
Can you split it in two, and then add:

        <dependency>../../config/test/all//BOOST_NO_STD_WSTREAMBUF

to the wide test requirements? See libs/serialization/test/Jamfile.v2,
which is where this trick is used.

- Volodya


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