|
Boost-Build : |
Subject: Re: [Boost-build] Different builds for XP and Vista/7
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2011-04-15 04:42:24
On 15.4.2011 4:43, Artem Alimarine wrote:
> On 13-4-2011 11:41, Juraj Ivanèiæ wrote:
>> lib foo_lib : foo_xp.cpp :<target-os-windows:flavor>xp ;
>> lib foo_lib : foo_vista.cpp :<target-os-windows:flavor>vista ;
>
> By the way, a feature fails in the same way as a subfeature.
>
> feature.feature target-os-flavor : vista xp : composite optional ;
> feature.compose<target-os-flavor>vista :<define>_WIN32_WINNT=0x0600 ;
> feature.compose<target-os-flavor>xp :<define>_WIN32_WINNT=0x0501 ;
>
> lib foo_lib
> : foo_xp.cpp
> :<target-os>windows
> <target-os-flavor>xp
> ;
> lib foo_lib
> : foo_vista.cpp
> :<target-os>windows
> <target-os-flavor>vista
> ;
Not really sure what is wrong - here is a transcript from my console:
D:\Personal\Playground\bb>ls
foo_vista.cpp foo_xp.cpp jamroot.jam
D:\Personal\Playground\bb>cat jamroot.jam
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 ;
alias foo_lib ;
lib foo_lib : foo_xp.cpp : <target-os-windows:flavor>xp ;
lib foo_lib : foo_vista.cpp : <target-os-windows:flavor>vista ;
D:\Personal\Playground\bb>bjam target-os=windows-xp foo_lib
...found 12 targets...
...updating 9 targets...
common.mkdir bin
common.mkdir bin\msvc-9.0
common.mkdir bin\msvc-9.0\debug
common.mkdir bin\msvc-9.0\debug\target-os-windows-xp
common.mkdir bin\msvc-9.0\debug\target-os-windows-xp\threading-multi
compile-c-c++
bin\msvc-9.0\debug\target-os-windows-xp\threading-multi\foo_xp.obj
foo_xp.cpp
msvc.link.dll
bin\msvc-9.0\debug\target-os-windows-xp\threading-multi\foo_lib.dl
l
msvc.manifest.dll
bin\msvc-9.0\debug\target-os-windows-xp\threading-multi\foo_li
b.dll
...updated 9 targets...
D:\Personal\Playground\bb>bjam target-os=windows-vista foo_lib
...found 12 targets...
...updating 6 targets...
common.mkdir bin\msvc-9.0\debug\target-os-windows-vista
common.mkdir bin\msvc-9.0\debug\target-os-windows-vista\threading-multi
compile-c-c++
bin\msvc-9.0\debug\target-os-windows-vista\threading-multi\foo_vis
ta.obj
foo_vista.cpp
msvc.link.dll
bin\msvc-9.0\debug\target-os-windows-vista\threading-multi\foo_lib
.dll
msvc.manifest.dll
bin\msvc-9.0\debug\target-os-windows-vista\threading-multi\foo
_lib.dll
...updated 6 targets...
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