[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why I can not overwrite CXXFLAGS values?

From: Ralf Wildenhues
Subject: Re: Why I can not overwrite CXXFLAGS values?
Date: Sat, 7 Jun 2008 09:38:57 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Steven,

* Steven Woody wrote on Fri, Jun 06, 2008 at 08:54:59PM CEST:
> In my system, the default CXXFLAGS is '-g -O2'.  But, for a particular
> program, I need -O0 and without -g.  I tried something like:
>   bin_PROGRAS = xxx
>   xxx_CXXFLAGS = -O0
> in  But, the final CXXFLAGS used when I compile is
> actually -O0 -g -O2, the default CXXFLAGS appended to my xxx_CXXFLAGS.

Note that is exactly done because CXXFLAGS is for the user, not the
developer.  If you try to outsmart the user, then that may fire back
because your users may just know better what's good for their system.
Yes, they really may.

That said, you can
  xxx_CXXFLAGS = -O0

and you probably want `AUTOMAKE_OPTIONS = -Wno-override' in that

Alternatively, you can modify $CXXFLAGS within; find out
whether CXXFLAGS was set by the user _before_ AC_PROG_CXX, and if it
wasn't, you can default it to your liking.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]