[cmake] don't use FORTIFY_SOURCE with ASAN

pull/2320/head
nick black 3 years ago
parent 2e01c4c217
commit e8089373ce

@ -113,7 +113,10 @@ endif()
# global compiler flags
if(NOT WIN32)
# MSYS2 needs -lssp and -fstack-protector for _FORTIFY_SOURCE
# macOS with ASAN can't handle _FORTIFY_SOURCE != 1
if(NOT ${USE_ASAN})
add_compile_definitions(_FORTIFY_SOURCE=2)
endif()
add_compile_options(-Wformat -Werror=format-security)
endif()
if(MSVC)

Loading…
Cancel
Save