So as it seems CMAKE_C_FLAGS is prepended rather than appended.
Yes, and that is the problem. I would like to change the optimization to -O3. But RELEASE flags set -O2 and overwrites my -O3 again. Hm... so it seems like I have no choice but to patch the CMakeLists.txt file in my build-process.