|
Boost-Build : |
Subject: Re: [Boost-build] Different builds for XP and Vista/7
From: Artem Alimarine (brakoziabr_at_[hidden])
Date: 2011-04-12 16:28:27
Thanks for help.
The next step is to select implementation based on the target flavor. I
have now the following Jamroot.
--------------------------------------------------------------------------
import feature ;
feature.subfeature target-os windows : flavor : vista xp : composite
optional ;
feature.compose <target-os-windows:flavor>vista :
<define>_WIN32_WINNT=0x0600 ;
feature.compose <target-os-windows:flavor>xp :
<define>_WIN32_WINNT=0x0501 ;
lib foo_lib : foo_xp.cpp : <target-os>windows-xp ;
lib foo_lib : foo_vista.cpp : <target-os>windows-vista ;
exe main : main.cpp foo_lib ;
exe main_xp : main.cpp foo_lib : <target-os>windows-xp ;
exe main_vista : main.cpp foo_lib : <target-os>windows-vista ;
--------------------------------------------------------------------------
There is a problem. When I run it with
bjam toolset=msvc target-os=windows-xp main
or
bjam toolset=msvc target-os=windows-xp main_xp
I always get
error: No best alternative for ./foo_lib
next alternative: required properties: <target-os>windows-xp
not matched
next alternative: required properties: <target-os>windows-vista
not matched
How do I achieve that the build is picked according to the flavor given
in the command line or in the executable properties?
Artem
On 11-4-2011 14:08, Juraj Ivanèiæ wrote:
> On 11.4.2011 12:17, Artem Alimarine wrote:
>
>> I need to have two different builds on Windows: one for XP target, and
>> the other for Vista/7 target. The difference will be mainly in defines
>> and in implementation files used.
>>
>> Is it already supported by a feature like target-os? What is the best
>> way to implement this?
>
> This should get you started.
>
> HTH
>
>
>
> _______________________________________________
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
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