Cache CMAKE_C_FLAGS because cmake is broken
Use a more logical order