Boost logo

Boost-Build :

Subject: Re: [Boost-build] Conditional src files
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2009-11-04 22:16:52


Anant Rao wrote:
> Thanks Steven! I'm sorry I didn't give the correct and complete info.
>
>
> Here's what my Jamfile looks like:
>
>
> project blah : source-location $(OS_SRC) $(OS_LINUX_SRC)
> $(OS_WIN_SRC) ;
>
> lib libblah : CommonFile1.cpp CommonFile2.cpp WinFile.cpp
> LinuxFile.cpp : <define>$(DEFINES) : <link>static ;
>
>
> Now, WinFile.cpp should be included only on Windows and LinuxFile.cpp
> on Linux. Given this, could you please let me know how I can do it?

It turns out Steven gave you all the info you needed...

project blah
    : source-location $(OS_SRC) $(OS_LINUX_SRC) $(OS_WIN_SRC)
    ;

lib libblah
:
CommonFile1.cpp
CommonFile2.cpp
: <define>$(DEFINES)
<target-os>windows:<source>WinFile.cpp
<target-os>linux:<source>LinuxFile.cpp
: <link>static
;

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org (msn) - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

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