On Thu, Mar 12, 2015 at 2:29 PM, Vladimir Prus <vladimir.prus@gmail.com> wrote:
On 03/12/2015 07:58 AM, Rene Rivera wrote:
On Wed, Mar 11, 2015 at 9:46 PM, Rene Rivera <grafikrobot@gmail.com <mailto:grafikrobot@gmail.com>> wrote:

    On Wed, Mar 11, 2015 at 9:39 PM, Steven Watanabe <watanabesj@gmail.com <mailto:watanabesj@gmail.com>> wrote:

        AMDG

        On 03/11/2015 08:23 PM, Rene Rivera wrote:
        > Before I go and hack BB  to support this I'm wondering if someone knows if
        > it's already possible.. I'm doing some BB files for an external library
        > (Cinder) and it has one unfortunate aspect that I need to deal with. It has
        > *.cpp files that are actually Objective C++ files on OSX, and plain C++ on
        > other platforms. So the basic question is:
        >
        > Is there an existing way to indicate the source type irrespective of the
        > file extension?
        >

        Does cast.jam do what you want?


    It certainly does look like it does what I want.. Will test it shortly. Thanks for pointing me to it.


Well.. It barely does what it says. It does change the type but it also seems to ignore any requirements.

Why would you want requirements on a source file, as opposed to on containing metatarget. E.g.:

        exe a : [ cast objective-c : a.cpp ] : your-requirements-or-conditionals ;

Because normally I would do this:

  exe a : a.cpp **1** : **2** <target-os>darwin:<source>b_really_mm.cpp <target-os>windows:<source>c.cpp ;

Where **1** and **2** are a long list of other source files / dependencies, and complicated requirements that would almost entirely need to be replicated for each different metatarget variant. And I hate replication. Like I said.. It's not impossible to do it.. Just painful.

And for context.. Attached is the current build file I'm creating where this came up.


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail