|
Boost-Build : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-06-04 06:49:55
[let's take this to the list, gentlemen]
Vladimir Prus <ghost_at_[hidden]> writes:
>> Can a target "use" (=depend on?) a project?
>
> I think "use" != "depend on". That's precisely why we were going to rename
> <dependency> to <use>. The properties with "dependency" attribute (another
> incorrect name), are generated as usual. Their usage requirements are applied
> as usual. But: there's no default dependency relation between main target
> with <dependency> property and the main target referred via <dependency>.
>
> The motivation came from one of the users.
>
> project : requirements <dependency>@/libx ;
> lib liba : test1.cpp test2 ;
>
> Here, only @/libx includes are needed. There's really no point in building it.
>
> # test2 should be compiled with optimization off, to workaround compiler
> # bug
> obj test2 : test.cpp : <optimization>off ;
>
> The <dependency>@/libx is in requirements of "test2". We really should not
> build libx the second time --- with optimization off.
>
> The bottom line is that we need <use> property to implement weak form of
> dependency --- one which does not recompiles.
My "special case" alarm bells as well as my "that's very C++-specific"
alarm bells, which Ali has trained me to listen for, are all ringing
right now.
Would it perhaps not be better to express that by generating two
targets, one of which is libx-headers and the other one which is libx
(or something)? The latter could depend on the former, and propagate
its usage requirements.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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