Boost logo

Boost-Build :

Subject: Re: [Boost-build] Conditional src files
From: Anant Rao (arao_at_[hidden])
Date: 2009-11-05 00:59:29


Hi Steven, Rene, Philip,
Thanks to you all!
Yes, I wanted 'static' and it works like a charm, doing exactly what I want.

I found out why it was not working, based on Steven's first email.
If I have

Option 1:

  F1.cpp
    : <define>$(DEFINES)
        : <link>static
    : <target-os>windows:<source>winfile.cpp ;

Winfile.cpp is not compiled.

Option 2:
  F1.cpp
    : <define>$(DEFINES)
    : <target-os>windows:<source>winfile.cpp
        : <link>static ;

I get a syntax error from bjam.

Option 3:
  F1.cpp
    : <define>$(DEFINES)
     <target-os>windows:<source>winfile.cpp
        : <link>static ;

Works correctly!!

I think using a ':' before <target-os> is the problem. Am I right?
Thanks a lot again to all of you.
Anant

-----Original Message-----
From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Steven Watanabe
Sent: Wednesday, November 04, 2009 7:23 PM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] Conditional src files

AMDG

Anant Rao wrote:
> 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
> ;
>

Did you really intend <link>static to be in the usage-requirements?
If I remember correctly that isn't allowed.

In Christ,
Steven Watanabe

_______________________________________________
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