Re: C++, assert and NDEBUG

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

 



On Sat, 2010-03-27 at 15:03 +0000, Steve Searle wrote: 
> I have started using autotools for the C++ applications I create (very
> much as an amateur). I typically use assert statements during
> development, and would disable these by using -DNDEBUG when the release
> version is built. How should I configure things so that when a user
> installs from the tarball they compile by default with the -DNDEBUG
> option?

The conventional way that should work for sane packages is:

        $ ./configure CPPFLAGS=-DNDEBUG

By convention, NDEBUG is *not* the default.  To make it otherwise
violates the principle of least surprise.

-- 
Braden McDaniel <braden@xxxxxxxxxxxxx>



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux