Boost logo

Boost-Build :

From: Christopher Currie (Christopher_at_[hidden])
Date: 2003-07-28 09:37:37

I've been pouring through the BBv2 code, looking for an easy place to
add a feature I've been wanting, but I'm starting to get lost in the
code. Basically my problem is that I want the <library> feature to add
usage-requriements to libraries that have the feature in their own

For example, taking the sample code used in the documentation:

lib utils : utils.cpp : : : <library>/boost/filesystem//fs ;
lib core : core.cpp : : : <library>utils ;
exe app : app.cpp core ;

This code declares an excecutable that delcares a library that uses
another library. My problem occurs when I try and put 'utils' in another

# utils/Jamfile.v2
project utils : usage-requirements <include>. ;
lib utils : utils.cpp : : : <library>/boost/filesystem//fs ;

# app/Jamfile.v2
lib core : core.cpp : : : <library>/utils//utils ;
exe app : app.cpp core ;

# ./Jamfile.v2
use-project /utils : utils ;

Assume that 'core' needs to include some "utils.hpp" in order to build
properly. This code will only add the <include> usage requirement to the
exe, not to the lib.

I could get around the problem by putting the <library> in the
requirements field instead of the usage requirements, but that results
in 'utils' being linked into 'core', which I imagine might result in
duplicate symbols if static libraries are built.

Any help is appreciated,


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