Change CMAKE_CXX_FLAGS to CMAKE_C_FLAGS, why did that work?