Boost logo

Boost :

Subject: Re: [boost] Boost.Build check to see if cxxflags flag is supported?
From: Peter Dimov (lists_at_[hidden])
Date: 2018-11-07 23:06:59


Steven Watanabe wrote:
...

> import flags ;
> project
> : requirements
> [ check-has-flag <cxxflags>-fPIC : <cxxflags>-fPIC ]
> ;
>
> Note 1: The documentation for this is only in
> `b2 --help flags.check-has-flag`. It isn't
> integrated into the html docs yet.
>
> Note 2: This is pretty new, so if you run into
> any problems, please let me know.
>
> Note 3: It might be more reliable to separate
> the object files out and set <link>shared on them:
> obj x.o : x.cpp : <link>shared ;
> ...
> lib l : x.o y.o ... ;
> (This will only work if the library is one
> that is specifically built for the test, not
> if it's a generic Boost library.)

Note 4:

This should probably be a feature, like <position-independent>on, which
toolsets translate to -fPIC as appropriate.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk