Correct compile flags for the debug build
Forcing the -O2
compile flag prevents proper functioning of the CMake parameter CMAKE_BUILD_TYPE=Debug
, since in this case, -Og
and -O2
will appear at the same time in the generated compile commands and the debug symbols will not be produced.