separate CXXFLAGS into required and optional