Boost logo

Boost-Build :

Subject: Re: [Boost-build] [boost-build] how to link against library conditional on compiler version?
From: John Maddock (jz.maddock_at_[hidden])
Date: 2016-08-04 12:52:26

> Now, other components just need to add foo_api as a dependency, and
> they'll automatically get the correct version.
> I know how to create a similar library in
> lib foo_api : : <name>foo <file>foo.a ;
> I don't, however, know how to conditionally specify the <file>
> argument dependent on compiler version.
> How can I check the compiler version and select the correct library?

I don't know the exact invocation (hopefully Rene will chime in here),
but Boost.Predef, specifically [ predef-check ] in combination with
BOOST_COMP_GNUC should be able to do that, see

HTH, John.

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