wiki:DebugRelease

Unified debug/release build

The goal is to unify the two current builds, debug and release, into single build. Asserts code will always be compiled in, but they'll only be checked if debugging is enabled at runtime (programmatically or using a (new) standard --debug command line option).

It will still be possible to disable asserts completely at compile time (e.g. for use on small embedded devices), but the standard builds will have debugging support.

Internal vs. external asserts

On a loosely related note, we should split assert macros into two categories as part of this task. wxASSERT and related macros are used for two distinct purposes in wxWidgets code:

  1. To check if wx API is used correctly.
  1. To check wx implementation. For example, checks in wxStringOperations are rather expensive and shouldn't be done by default. On the other hand, they are useful for wx developers, because they verify that UTF-8 strings are handled correctly. Similarly, wxTopLevelMSW::SetIcons() has an assert that triggers if the icons are set in a not-yet-implemented way.

We should introduce a new macro(s), wxINTERNAL_ASSERT, for the latter. These checks would be disabled by default, but could be enabled for debugging of wx itself.

Last modified 12 years ago Last modified on Nov 1, 2008, 7:52:12 PM