Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-06-25 03:18:06


Hi Konstantin,

> When I write:
>
> project lib2
>
> : usage-requirements <library>../lib1 ;
>
> lib lib2 : lib2.cpp ;
>
> where lib1 project is
>
> project lib1
>
> : usage-requirements <include>include ;
>
> lib lib1 : lib1.cpp ;
>
> i expect that lib2 will be build with -I"../lib1/include" comand line
> switch. It will be nice because current behaviour force me write

[snip]

> What i should do to avoid double ../lib1 - in usage-requirements as
> <library> and in <include>?

The reason is that requirements and usage-requirements are totally separate
now. That's certainly good from implementors POV, but for user it result in
duplications. Still, I'd like to get more experinece before adding more
convenient semantic. When we add it, it will be hard to change afterwards.

> When i try to compile examples-v2/libraries/lib1 with comand line
> bjam -d2 msvc I have got
>
> cl /Zm800 -nologo /Z7 /Od /Ob0 /GX /GR
> /MDd -I"bin\msvc\debug" -c -Fo"bin\msvc\debug\lib1.obj" "lib1.cpp"
>
> Why -I"bin\msvc\debug" ?

This is related to handling of generated headers. Suppose that your main
target generates a header. Of course, compiler should be able to use it,
so all target directories are added to include path.

BTW, I'm just working on improved dependency scanning, so this might change,
or at least, become more documented.

- 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