Add option for building with sanitizers like ASan, UBSan, LSan #74
Replies: 1 comment 2 replies
-
Yes. That sounds good. We could associate that with the matplotplusplus/CMakeLists.txt Line 41 in d0ef918 We could use these options by default when option(BUILD_WITH_SANITIZERS, "Build with enabled Address, Leak and Undefine Behaviour Sanitizers" ${BUILD_WITH_PEDANTIC_WARNINGS}) or applying these options in both cases. By supplementing this line: matplotplusplus/source/matplot/CMakeLists.txt Line 136 in d0ef918 like this: if (BUILD_WITH_PEDANTIC_WARNINGS)
# ...
endif ()
if (BUILD_WITH_PEDANTIC_WARNINGS OR BUILD_WITH_SANITIZERS)
# ...
endif () Maybe the second option is better because it's more explicit. Cmake might cache the options and the default values might not apply. Or using both options. I'm just not sure MSVC has equivalent options and whether the names are the same for GCC and Clang. |
Beta Was this translation helpful? Give feedback.
-
It could improve detecting bugs while debugging.
In my own local copy I just add a
, but I suggest the distinct CMake
option(BUILD_WITH_SANITIZERS, "Build with enabled Address, Leak and Undefine Behaviour Sanitizers" OFF)
and recommend to build the all examples and tests on CI with this option.(I could also make a PR with this feature).
Beta Was this translation helpful? Give feedback.
All reactions