To pass `CFLAGS` you need to call `-DCMAKE_C_FLAGS="what you think is needed"`.