Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-15 08:19:17


Hi Ian,

> For example, suppose my Jamfile has:
>
> use-project /b : ../src ;
> mex a_mex : a_mex.cpp : <library>/b//b ;
>
> Assuming that b has a Jamfile in the directory ../src like this:
>
> project b : usage-requirements <include>. ;
> lib b : b.cpp ;
>
> The command that finally gets sent to the shell is:
> $MATLAB/bin/mex -O a_mex.cpp -DMATLAB -I../src -I$MATLAB/extern/include
> -L $MATLAB/extern/lib/mac -lmat -lm -o
> bin/darwin-3.3/release/a_mex.mexmac
>
> so it seems that the linkpath and libraries all are empty, and aren't
> getting propagated. I'm not sure where to go from here.
.....
> import generators ;
> generators.register-composing mex.mex : CPP LIB : MEX ;

The <library> feature is handled directly by "linking-generator", in
builtin.jam. So:

1. If your generator is sufficiently[*] like linker, declara it with
generators.register-linker

2. Just add "/b//b" to the sources of "a_max" target.
3. Use the <source> feauture that, unlike <library>, applies to all targets.

> # I think all this stuff is slightly (or completely) wrong, as it doesn't
> seem to work right.

What exactly does not work right?

> import toolset : flags ;
> flags mex.mex OPTIONS <debug-symbols>on : -g ;
> flags mex.mex OPTIONS <optimization>off : ;
> flags mex.mex OPTIONS <optimization>speed : -O ;
> flags mex.mex LINKPATH <library-path> ;
> flags mex.mex INCLUDES <include> ;
> flags mex.mex FINDLIBS-ST <find-static-library> ;
> flags mex.mex FINDLIBS-SA <find-shared-library> ;
> flags mex.mex LIBRARIES <library-file> ;

HTH,
Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk