automake
[Top][All Lists]
Advanced

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

Re: multiple targets, different build options


From: William Pursell
Subject: Re: multiple targets, different build options
Date: Thu, 25 Sep 2008 07:29:43 +0100
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

Peter Johansson wrote:

I use the following snippet in one my projects:

AC_ARG_ENABLE(debug,
   [AS_HELP_STRING([--enable-debug],[turn on debug options and code])],
   [SD_CXXFLAGS="$SD_CXXFLAGS -g -O"],
   [SD_CPPFLAGS="-DNDEBUG" SD_CXXFLAGS="$SD_CXXFLAGS -O3"])

FWIW, as a user I find this setup slightly confusing
(--enable should enable a feature, so perhaps --with-debug
is more appropriate) so I switched awhile back to
doing AC_AR_VAR and allowing DEBUG=foo to set
-DDEBUG=foo (defaults to 1). It gives slightly
more flexibility to do DEBUG=3 or DEBUG=6 and
have leveled debugs in the code.

--
William Pursell




reply via email to

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