cmake 内存泄露检查

在CMakeLists添加:

set(CMAKE_CXX_FLAGS "-fsanitize=undefined,address,leak -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS "-fsanitize=undefined,address,leak -fno-omit-frame-pointer")
set(CMAKE_L_FLAGS "-fsanitize=undefined,address,leak -fno-omit-frame-pointer")

posted @ 2021-02-23 17:09  angry_gladiator  阅读(757)  评论(0编辑  收藏  举报