|
Boost-Build : |
From: Bojan Resnik (resnikb_at_[hidden])
Date: 2006-10-06 02:54:06
> Hello!
>
> I'm trying to build a library with msvc and gcc. I'd like to specify
> different #defines depending on the toolset. Here's my attempt:
>
>
> project
> : requirements <include>. <include>GFL/
> ;
>
> lib GFL : [ glob GFL/xml/*.cpp ] : <toolset>gcc:<define>GEOROG ;
> lib GFL : [ glob GFL/xml/*.cpp ] : <toolset>msvc:<define>GEO ;
>
> Here is the output from bjam
> : bjam -q gcc
> error: No best alternative for ./GFL
> next alternative: required properties: (empty)
> matched
> next alternative: required properties: (empty)
> matched
> ...found 1 target...
>
> How can I specify different #defines depending on toolset?
Try this:
lib GFL : [ glob GFL/xml/*.cpp ]
: <toolset>msvc:<define>GEO
<toolset>gcc:<define>GEOROG
;
or
lib GFL : [ glob GFL/xml/*.cpp ] : <toolset>gcc <define>GEOROG ;
lib GFL : [ glob GFL/xml/*.cpp ] : <toolset>msvc <define>GEO ;
-- Bojan Resnik
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