3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 12:23:41 +01:00

add float-cast-overflow and float-divide-by-zero to ubsan checks

This commit is contained in:
Nils Wentzell 2018-11-26 12:04:35 -05:00
parent 9e442be0e0
commit aef818bc28

View File

@ -74,7 +74,7 @@ option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior S
if(UBSAN)
find_package(libubsan_rt REQUIRED)
target_compile_options(app4triqs_c PUBLIC -fsanitize=undefined -fno-omit-frame-pointer -fno-sanitize=vptr)
target_link_libraries(app4triqs_c INTERFACE "-fsanitize=undefined -fno-omit-frame-pointer")
target_link_libraries(app4triqs_c INTERFACE "-fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-omit-frame-pointer")
endif()
if(ASAN OR UBSAN AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")