Boost logo

Boost-Build :

Subject: [Boost-build] [build] Linking conditionally depending of a compiler version
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-05-12 09:45:41


Hi,

Boost.Thread has to link with Boost.Chrono when
BOOST_THREAD_DONT_USE_CHRONO is not defined.

Some compiler versions don't support Boost.Chrono and so the config file
includes the following

#if defined __IBMCPP__ && (__IBMCPP__ < 1100)
#define BOOST_THREAD_DONT_USE_CHRONO
#endif

so that the user of this compiler can use Boost.Thread without the
Chrono facilities.

I customized the usuage requirements to prevent linking with boost as
follows

     if ! <toolset>vacpp in $(properties)
     {
       result += <library>/boost/chrono//boost_chrono ;
     }

Unfortunately/fortunately more recent versions of the compiler supports
in an acceptable way Boost.Chrono.

If I do always

       result += <library>/boost/chrono//boost_chrono ;

No test will work for vacpp 10.1, which is not desirable.

I would like to don't link with Boost.Chrono only for the failing
version. Is there a way to achieve this with Boost.Build?
How to know the version of the compiler is a Jamfile?

Thanks,
Vicente


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