Boost logo

Boost-Build :

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

Steve <rev_benny_hinn <at>> 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
-I"$(INCLUDES)" -c -o "$(<)" "$(>)" }

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

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


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at