Re: [gtkmm] Compilation time
- From: Daniel Elstner <daniel elstner gmx net>
- To: Daniel <dss home se>
- Cc: Ole Laursen <olau hardworking dk>, gtkmm-list gnome org
- Subject: Re: [gtkmm] Compilation time
- Date: 22 Sep 2002 16:54:08 +0200
Am Son, 2002-09-22 um 01.55 schrieb Daniel:
> On 21 Sep 2002 21:22:48 +0200
> Ole Laursen <olau hardworking dk> wrote:
>
> > Daniel Elstner <daniel elstner gmx net> writes:
> > > 2) don't use -O2 for devel builds
> >
> > I've been wondering - how to do this cleanly with Automake so that
> > the optimizations are only turned off for developer builds? Currently
> > I simply do something like this:
> >
> > CXXFLAGS = @CXXFLAGS@ $(DEPS_CFLAGS) -Wall -O0
> >
>
> In my project I use a modified version of the configure.in found in
the gtkmm_hello example. There is nothing about -O in the configure.in
file but when I compile it uses -O2. How can I set this to -O0 when
compiling? If I specify two -O options, which of them will be used by
the compiler?
Well, why don't you just put a little shell script together:
export CFLAGS='-pipe -g'
export CXXFLAGS='-pipe -g'
Of course it's also possible to incorporate this into the configure
script, but it isn't really necessary. You could use --enable-optimize
like Paul Davis suggested, or --enable-debug to do it the other way
around.
If you want to prevent configure from using the default flags '-g -O2',
then do at the top of configure.in:
test "x$CFLAGS" = "x" && CFLAGS=' '
test "x$CXXFLAGS" = "x" && CXXFLAGS=' '
The dummy space makes configure think the flags have been set by the
user.
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]