Use CMAKE_CXX_FLAGS not CXXFLAGS