Boost logo

Boost-Build :

From: Steve (rev_benny_hinn_at_[hidden])
Date: 2006-08-29 20:01:14


Steve <rev_benny_hinn <at> yahoo.com> writes:

> I've tried registering .m files with the darwin.compile.c generator,
> but when bjam runs I get a large number of complaints from g++ -
> it appears to think that SDLMain.m is a c++ file as opposed to
> an Objective-C file. I think I should be using gcc instead,
> but am not sure how to write the appropriate jam code.

Think I've managed to get this working. I hadn't noticed that you can
use the '-x' flag to tell g++ which language it's compiling.

I added the following lines to darwin.jam:

# ------------------------------------------------------------
# BEGIN Insertion into darwin.jam
# ------------------------------------------------------------

type.register M : m ;

generators.register-c-compiler darwin.compile.m
  : M : OBJ : <toolset>darwin ;

rule compile.m
  { LANG on $(<) = "-x objective-c" ; }

actions compile.m
  { "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES)
-I"$(INCLUDES)" -c -o "$(<)" "$(>)" }

# ------------------------------------------------------------
# END Insertion into darwin.jam
# ------------------------------------------------------------

Can anyone tell me if I've done this correctly?

Cheers,
Steve


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