File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11option (ENABLE_ADDRESS_SANITIZER OFF )
2- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
2+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
33 if (ENABLE_ADDRESS_SANITIZER)
44 add_compile_options (-fsanitize=address)
55 add_link_options (-fsanitize=address)
6- message (STATUS "Enabled clang address sanitizer" )
6+ message (STATUS "Enabled address sanitizer" )
77 endif ()
88 if (ENABLE_UB_SANITIZER)
99 add_compile_options (-fsanitize=undefined)
1010 add_link_options (-fsanitize=undefined)
11- message (STATUS "Enabled clang UB sanitizer" )
11+ message (STATUS "Enabled UB sanitizer" )
1212 endif ()
1313else ()
14- message (WARNING "Sanitizers are supported on clang compiler only! Switch your compiler to clang to enable it " )
14+ message (WARNING "Sanitizers are supported on gcc and clang compilers only! " )
1515endif ()
You can’t perform that action at this time.
0 commit comments