Have discovered a performance regression with Windows builds after switching to RelWithDebInfo (to enable crash reporting)
RelWithDebInfo uses /Ob1 whereas Release uses /Ob2 : and for modern C++ code, this is a large pesimisation.
Value comes from Windows-MSVC.cmake:
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "${_MD} /Zi /O2 /Ob1 /DNDEBUG")
What’s the recommended way to reset / override this in my project, while keeping everything else as compatible to future changes as possible?