I was wondering, 

-DCMAKE_BUILD_TYPE=Release (or RelWithDebInfo) doesn't seem to enable -O2 on gcc.

Is there a good reason for it or was it just forgotten?