function(simv_enable_sanitizers TARGET) if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") return() endif() if(MSVC) target_compile_options(${TARGET} PRIVATE /fsanitize=address) else() target_compile_options(${TARGET} PRIVATE -fsanitize=address,undefined -fno-omit-frame-pointer) target_link_options (${TARGET} PRIVATE -fsanitize=address,undefined) endif() endfunction()