Building boost as part of larger project which also uses jam
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, Phillip
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. I suggest that you take a look at the list of toolsets supported by V2 at: http://boost.org/boost-build2/doc/tools.html If yours is listed, you might want to just try V2. - Volodya
Vladimir Prus
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, -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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
participants (3)
-
David Abrahams
-
Phillip Seaver
-
Vladimir Prus