David Abrahams wrote:
Vladimir Prus
writes: Phillip Seaver wrote:
I want to switch to jam for building our projects and I was wondering how to handle building boost within those projects. Will "subinclude boost" from the directory above it work? Or will I have to use bjam on the boost tree (like a recursive make)?
Thanks in advance,
In Boost.Build V2, using boost from your project is a simple matter of saying something like:
use /boost/filesystem : $(BOOST_ROOT)/libs/filesystem/build ;
exe foo : foo.cpp /boost/filesystem//boost_filesystem ;
This will even automatically add boost includes when compiling foo.cpp.
As for V1, I'm not sure.
It's straightforward.
In the top level of your project, put this "Jamrules" file:
---- Begin Jamrules ---- project boost : path/to/boost/root/directory ; # contains libs/, more/, ... ---- End Jamrules ----
To link with a boost library or dll, add something like this to your target's sources:
<lib>@boost/libs/filesystem/build/boost_filesystem or <dll>@boost/libs/date_time/build/boost_date_time
HTH,
Thanks for your help. Hopefully I'll have an opportunity to try it out soon. Sincerely, Phillip