7 Nov
2018
7 Nov
'18
11:06 p.m.
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.