Re: how do I change compilation flags for selected targets?

"Joerg Beyer" <j.beyer-S0/[email protected]>
Newsgroups gmane.comp.tools.aap.user
Organization http://freemail.web.de/
Message-ID <[email protected]>
adridg-FlD2LfDziEhmR6Xm/[email protected] schrieb am 05.11.03 10:59:07:
> 
> On Wed, 5 Nov 2003, Joerg Beyer wrote:
> > ----------------------------------
> > SOURCES =·
> >     main.cpp
> >     ext.cpp
> 
> 
> My approach (not clean AAP, and not stamped with the Seal of Bram's
> Approval) would be to
> 
> SOURCES = main.cpp { add_CFLAGS = -O1 } ext.cpp { add_CFLAGS = -O2 }

Adriaan, thanks for the quick answer.

with a little change ( 
SOURCES =· main.cpp  ext.cpp { add_CXXFLAGS = -O2 }
) this works, sort of. the Flag is appended - this is what add_* does.

the compilation is done with this commandline:
g++    -O1 -O2 -O2 -c -o build-Linux2_4_20_web/ext.o ext.cpp

this is not clean: it lets the compiler dedice what to do about
the different -Ox's on the commandline.

maybe Bram knows this: is there a way to change the values of a 
variable for one (or a set of) targets?

I think, that special filetypes are the overkill for that.

    Joerg



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.