Sometimes there's release mode bugs that are just hard to track down cause they don't happen in debug builds or can't be reproduced on a developer work station at all. This patch adds the option for including debugging symbols in release builds. The RelWithDebInfo configuration has shown to be unreliable (we tend to set debug/release c/cxx flags, but neglect RelWithDebinfo and MinSizeRel maybe we should remove these configurations all together on windows?)
This patch enables the following scenario's
- Easier debugging of release mode problems on developer workstations.
- allowing to ship an end users a build that will produce a crashdump with stack dump.
The option is controlled through the WITH_WINDOWS_RELEASE_DEBUG_SYMBOLS cmake option, and it's marked as advanced and off by default
The original patch i send @Sergey Sharybin (sergey) earlier today also included writing out a crashdump (akin to a coredump on linux) but I wasn't happy with how that was implemented, so i stripped that off, might bring it back at a later point in time if there's a need for it.