Add new Release With Asserts build mode
By default, -DNDEBUG
is used for Release builds. This is a really terrible design. This is how it should be but it is too late for C++. To improve the situation it would be good to have a ReleaseWithAsserts build mode, where -DNDEBUG
is not defined.
A workaround is to use your own definition of assert()
, and ban the default one. But this does not work for existing projects.
An alternative solution would be to remove -DNDEBUG
from the Release mode, and add a separate target option to disable asserts. I think I'd prefer this but it would be a big change in behaviour.