Boost logo

Boost-Build :

From: Matthew Herrmann (matthew.herrmann_at_[hidden])
Date: 2006-05-01 20:40:32


Hi,

For the record, I found a workaround for this:

The variant inheritance only copies the contained properties, there is no
explicit relationship maintained between the two variants (a little
misleading).

I used a <runtime-debugging>on:<define>MY_FLAG instead of
<variant>debug:<define>MY_FLAG and it then behaved as I expected.

HTH,
Matthew Herrmann

On Monday 01 May 2006 15:26, Matthew Herrmann wrote:
> Hi All,
>
> I am seeing a problem where conditional properties defined on variants are
> not being activated when building against an inherited variant.
>
> In the code below, I expect both DEBUG_FLAG and DEBUG_FLAG_2 to be defined
> when compiling my_app. However, only DEBUG_FLAG is set.
>
> =============================================
>
> project myapp ;
>
> # define a variant suitable for testing position counts
> variant debug_child
>
> : debug : <define>DEBUG_FLAG ;
>
> exe my_app
>
> : # sources
>
> [ glob *.cpp ]
>
> : # requirements (debug/release, platform)
>
> <variant>debug:<define>DEBUG_FLAG_2
>
>
>
> ;
>
> $ bjam -d+2 debug_child
> gcc.compile.c++ bin/gcc/debug_child/test.o
>
> "ccache" "gcc" -Wall -ftemplate-depth-100 -O0 -fno-inline -g -fPIC
> -DDEBUG_FLAG -c -o "bin/gcc/debug_child/test.o" "test.cpp"
>


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