Boost logo

Boost-Build :

From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2007-01-15 05:52:51

Hi Everyone,

I have quite a number of projects where I have in my Jamfile:

  use-project /boost : /usr/local/boost ;

For some, I've even used the environment variable BOOST_ROOT and did
something like:

  import modules ;

  local BOOST_DIR = [ modules.peek : BOOST_ROOT ] ;

  use-project /boost : $(BOOST_DIR) ;

Now I'm packaging a couple of projects I'm working on for Debian
GNU/Linux, and I'm having a hard time figuring out how to make the
above method of specifying the Boost Distribution work. In particular,
how do I make the following (sample) Jamfile configuration work,
without relying on the Boost root Jamfile:

  import modules ;
  local BOOST_DIR = [ modules.peek : BOOST_ROOT ] ;
  use-project /boost : $(BOOST_DIR) ;

  exe my_exe : main.cpp /boost//serialization /boost//filesystem
    : <link>static <threading>multi

I'm also now thinking whether the Debian packaged Boost libraries and
Boost.Build would be able to contain not only the Boost root Jamfile,
but also the targets that some of the libraries define while building
(like serialization, filesystem, unit_testing_framework (?) ).

So the question is two-part: Is the above method a good way of using
Boost Library targets in a project? If not, what other options do I
have should I want to refer to Boost Library targets without having to
explicitly do something like
"<linkflags>-lboost_serialization-gcc402-mt-st" -- which is not
portable and if I may say so would be ugly.

Debian specific pointers would also be greatly appreciated.

Have a great day everyone!

Dean Michael C. Berris
mikhailberis AT gmail DOT com
+63 928 7291459

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