@space88man Hmm, i just read through https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html. Since, the one you define is passed first (prepended) followed by the project options (each `target_compile_options` appends to the last ones), the last `-O` wins the race.
I think since the default option of GCC is `-O0` if none is passed, I think it's safe to remove it from the `compiler-specific.cmake`, so if one want to alter the optimization level, it's safe to do it via the above `CFLAGS="-O2"` method.