assert in release builds
I noticed that xcode doesn't remove the asserts from the release build. Is this a bug? I thought that was the whole point of asserts, that they would be removed during release build.
Any work around?
Any work around?
Add -DNDEBUG to "other C flags" under the release configuration only.
Not really sure why it's not there by default. Feel free to file a bug. http://bugreport.apple.com/
Not really sure why it's not there by default. Feel free to file a bug. http://bugreport.apple.com/
Thanks OneSadCookie, that works!
(reported)
I've wondered that myself. Chipmunk has a bunch of assert statements and a lot of people just dump the Chipmunk source into their project without knowing to add -DNDEBUG. I've had a number of people complain about that. On the other hand, most of the same people also don't know to disable thumb compilation or use -ffast-math either. (shrugs)
I made a shell script that builds a 3-way static lib with all the correct settings, but people still opt to copy the source files. I guess old habits die hard.
I've wondered that myself. Chipmunk has a bunch of assert statements and a lot of people just dump the Chipmunk source into their project without knowing to add -DNDEBUG. I've had a number of people complain about that. On the other hand, most of the same people also don't know to disable thumb compilation or use -ffast-math either. (shrugs)
I made a shell script that builds a 3-way static lib with all the correct settings, but people still opt to copy the source files. I guess old habits die hard.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Skorche Wrote:(reported)Looks like I'm one of those people
On the other hand, most of the same people also don't know to disable thumb compilation or use -ffast-math either.
I never knew -ffast-math existed. I see it mentioned on forums, but only in relation to x86 code.

