The current setup of the defaults for CMAKE_CXX_FLAGS_${BUILD_TYPE} are not picked up (also see #6574). To change the defaults for ROOT and allowing users to set their own CMAKE_CXX_FLAGS_${BUILD_TYPE} flags, the definition of the ROOT specific defaults have to move before we invoke project(ROOT).
Geant4 has a proper implementation of such a mechanic here. The proper approach is overwriting CMAKE_CXX_FLAGS_${BUILD_TYPE}_INIT (note the _INIT) before invoking project(ROOT).