|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-18 02:35:10
Hi Jürgen,
> I've got two projects a and b. Project b depends on project a.
> Project a declares a custom build variant:
>
> # define develop variant without NDEBUG defined
> variant develop : <optimization>speed
> <debug-symbols>on
> <inlining>full
> <runtime-debugging>off ;
>
> used for my projects.
>
> Until yesterday, I was able to refer the build variant from project b.
...
> Is this a bug or a feature ?
More like feature.
> Did I abuse V2 by not defining my variant in user-config.jam ?
Kind of. I'd suggest that you define this variant in your project-root.jam.
Here's a detailed explanation. You have:
use-project /project-a : ../project-a ;
project RailSys-Filter ...........
There happen to be a bug report about such situation:
http://localhost:7814/scarab/issues/id/BB57
In short, if you have 'use-project' before 'project' and 'use-project' refers
to a child project, then child project is loaded before parent, and does not
inherit any settings specified in 'project' rule invocation.
I've fixed this by delaying loading of project referred by "use-project". But
in your case you implicitly relied on the fact that 'use-project' immediately
loads the referenced project.
I think putting variant definition into project-root.jam is safer. Of, you can
create a Jamfile in parent directory of "a" and "b" and define the variant
there, it should work as well.
- 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