Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-14 00:24:56

Hi Trevor

[I'm moving this to jamboost mailing list, which is the right place for bjam

Trevor Taylor wrote:

> I set out to use Boost Jam to build my latest little experiment. I have
> some questions/comments:
> Why does it build everything into a target-specific subdirectory?

> exe a : $( ....
> exe c : $(
> But building a and c compiles twice (once into
> bin/a.exe/gcc/debug/runtime-link-dynamic/b.o and once into
> bin/c.exe/gcc/debug/runtime-link-dynamic/b.o

This is no longer so in Boost.Build V2. In fact, using the same source in
library and unit test program was my original motivation to change.

> I would have thought bin/gcc/debug/b.o would have been enough. Why would
> the b.o produced depend on which executable it was bound for? Why
> would it depend on wether it was bound for a dll or not?

In this case, it should not. In general, it could be possible for some cases:

exe a : a.cpp : <define>FOO ;
exe b : a.cpp : <define>BAR ;

Here, objects compiled with different defines are not necessary the same, so
they will be generated to directories specific to main targets. E.g you'll
have (in V2)


> Where are "compile and link flag" equivalents documented?
> --------------------------------------------------------
> I wanted to link against libxerces.a that I had built separately, but
> couldn't figure out how to specify the equivalent of -L/blah -lxerces.

Unfortunately, nowhere. We'll note this need for V2 docs. In V1, you'll
use <find-library> for -l and <library-path> feature for -L

> How does one add a rule for building C++ files from e.g. IDL?
> -------------------------------------------------------------
> In my case I am using Qt which needs me to run its "moc" compiler to
> generate a .cc from my .hh. I put in:
> rule moc
> {
> DEPENDS $(<) : $(>) ;
> }
> actions moc
> {
> "$(QTDIR)/bin/moc.exe" "-o" $(1) $(2)
> }
> moc : Tasks.hh ;
> But somehow that resulted in either Boost Jam looking for something like
> bin/a.exe/gcc.../Tasks.hh or insisting on recompiling
> everytime (bjam -d output suggested Tasks.hh didn't exist, when clearly
> it did).

Here, I can say only one thing: Boost.Build V2 already has support for QT:
both moc and uic tools. You migh want to look at "examples-v2/qt".


> Thanks for any help,
> Trevor
> _______________________________________________
> Unsubscribe & other changes:


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