|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-01-31 06:35:59
Hi Foster,
> + if ! [ MATCH ^([67].*) : $(version) ]
> + {
> + flags msvc.compile.rc DEFINES : "ADOBE_VER=8 " ;
> + }
> + else
> + {
> + flags msvc.compile.rc DEFINES : "ADOBE_VER=7 " ;
> + }
> +
> + #
> + # ADOBE : End changes
> + #
> }
>
> rule default-paths ( version ? )
>
> Or problem is this: irrespective of the compiler for which we are
> targeting, the resource compiler gets both "-DADOBE_VER=7" *and*
> "-DADOBE_VER=8". Are there any insights into this issue of which we
> are not aware?
I need to know what's in your user-config.jam, or site-config.jam, or
whatever. The problem with the above code is that
flags msvc.compile.rc DEFINES : "ADOBE_VER=8 " ;
unconditionally adds the specified value to DEFINES for msvc toolset. Not for
specific version, but for all invocation of msvc.compile.rc rule. Same for
the second line. So, if you have two compilers configure, both defines will
be added.
I'd suggest using this:
flags msvc.compile.rc DEFINES $(condition) : "ADOVE_VER=8" ;
The 'condition' is computed on in msvc.jam:configure-really, line 209 in my
copy and that line reads like:
local condition = [ common.check-init-parameters msvc :
version $(v) ] ;
Please make sure that this value is available at the point where you invoke
the 'flags' rule. You might also ECHO the value of $(condition) right before
calling 'flag'. It should look like "<toolset>msvc-6.0" (or whatever version
is being initialized).
HTH,
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