If you have code that benefits significantly from compiler optimizations, you might want to try to compile in 'release with debug info' instead:
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfoAs @darkp03 mentioned, make sure you are pressing QtCreator's 'debug button' (or shortcut key F5) and not the 'run' button.