mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 02:04:12 +08:00
mdbx-cmake: add ENABLE_UBSAN option.
Change-Id: Ic4333f28aa6494be24c7be1f396bd069dcb9bb5d
This commit is contained in:
parent
2ee45b1820
commit
500fed496c
@ -651,6 +651,10 @@ macro(setup_compile_flags)
|
|||||||
add_compile_flags("C;CXX" -fsanitize=address)
|
add_compile_flags("C;CXX" -fsanitize=address)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_UBSAN)
|
||||||
|
add_compile_flags("C;CXX" -fsanitize=undefined)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_GCOV)
|
if(ENABLE_GCOV)
|
||||||
if(NOT HAVE_GCOV)
|
if(NOT HAVE_GCOV)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
|
@ -42,4 +42,7 @@ endif()
|
|||||||
option(ENABLE_ASAN
|
option(ENABLE_ASAN
|
||||||
"Enable AddressSanitizer, a fast memory error detector based on compiler instrumentation" OFF)
|
"Enable AddressSanitizer, a fast memory error detector based on compiler instrumentation" OFF)
|
||||||
|
|
||||||
|
option(ENABLE_UBSAN
|
||||||
|
"Enable UndefinedBehaviorSanitizer, a fast undefined behavior detector based on compiler instrumentation" OFF)
|
||||||
|
|
||||||
cmake_policy(POP)
|
cmake_policy(POP)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user