You may take a look at src/cmake/SociConfig.cmake, feel free to update the flags.
I thoroughly agree, we should aim clean compilation, so let's not forget it #100