This reverts commit8a54e478ba. As commit7dadd38161("Revert "configure: Switch debug build from -O0 to -Og") was reverted (byb7627085cb, "Revert "Revert "configure: Switch debug build from -O0 to -Og""")), we do the same to cmake to keep the two build systems in sync. Closes #14286