[cmake] Set CFLAGS and CXXFLAGS options using CMake