mirror of
https://github.com/triqs/dft_tools
synced 2024-12-31 16:45:49 +01:00
add float-cast-overflow and float-divide-by-zero to ubsan checks
This commit is contained in:
parent
9e442be0e0
commit
aef818bc28
@ -74,7 +74,7 @@ option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior S
|
|||||||
if(UBSAN)
|
if(UBSAN)
|
||||||
find_package(libubsan_rt REQUIRED)
|
find_package(libubsan_rt REQUIRED)
|
||||||
target_compile_options(app4triqs_c PUBLIC -fsanitize=undefined -fno-omit-frame-pointer -fno-sanitize=vptr)
|
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()
|
endif()
|
||||||
|
|
||||||
if(ASAN OR UBSAN AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
if(ASAN OR UBSAN AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||||
|
Loading…
Reference in New Issue
Block a user