Re: NDEBUG when building packages?
* Ian Jackson:
> Mathieu Malaterre writes ("Re: NDEBUG when building packages?"):
>> On Tue, Feb 19, 2013 at 5:30 PM, Ian Jackson
>> <ijackson@chiark.greenend.org.uk> wrote:
>> > Daniel Pocock writes ("NDEBUG when building packages?"):
>> >> I notice some upstreams hack NDEBUG into their Makefile, while others
>> >> leave it at the discretion of the user
>> >>
>> >> Is there any distribution policy for this? Should I be adding something
>> >> into debian/rules to set -DNDEBUG when I prepare a package for release?
>> >
>> > -DNDEBUG is (normally) EBW.
>>
>> http://en.wikipedia.org/wiki/EBW ?
>
> Evil, Bad and Wrong.
So it's not "everbody wins"? Oh.
> Certainly -DNDEBUG should never be used unless upstream explicitly say
> that it's intended to be supported, and usually not even then.
I've seen some cases where -DNDEBUG pampers over crashers due to
invalid asserts. On the other hand, there is a lot of code out there
which performs actions with side effects inside the assert.
Not overriding upstream's default is probably a good idea, but as was
pointed out, this is a bit murky with CMake projects.
Reply to: