Double-check that your set(CMAKE_CXX_FLAGS_DEBUG ...) command is correctly placed and that CMake is indeed passing these flags to the compiler during a debug build.
set(CMAKE_CXX_FLAGS_DEBUG ...)