2021-02-08 21:54:40 +00:00
|
|
|
target_compile_options(zm-warning-interface
|
|
|
|
INTERFACE
|
2021-02-27 01:08:14 +00:00
|
|
|
-Wall
|
2021-03-18 12:00:36 +00:00
|
|
|
-Wconditionally-supported
|
2021-02-27 01:08:14 +00:00
|
|
|
-Wextra
|
2021-03-05 21:24:33 +00:00
|
|
|
-Wformat-security
|
2021-02-27 01:08:14 +00:00
|
|
|
-Wno-cast-function-type
|
|
|
|
-Wno-type-limits
|
|
|
|
-Wno-unused-parameter)
|
2021-02-08 22:07:21 +00:00
|
|
|
|
|
|
|
if(ASAN)
|
|
|
|
target_compile_options(zm-compile-option-interface
|
|
|
|
INTERFACE
|
|
|
|
-fno-omit-frame-pointer
|
|
|
|
-fsanitize=address
|
|
|
|
-fsanitize-recover=address
|
|
|
|
-fsanitize-address-use-after-scope)
|
|
|
|
|
|
|
|
target_link_options(zm-compile-option-interface
|
|
|
|
INTERFACE
|
|
|
|
-fno-omit-frame-pointer
|
|
|
|
-fsanitize=address
|
|
|
|
-fsanitize-recover=address
|
|
|
|
-fsanitize-address-use-after-scope)
|
|
|
|
|
|
|
|
message(STATUS "GCC: Enabled AddressSanitizer (ASan)")
|
|
|
|
endif()
|
2021-02-10 23:38:31 +00:00
|
|
|
|
|
|
|
if(TSAN)
|
|
|
|
target_compile_options(zm-compile-option-interface
|
|
|
|
INTERFACE
|
|
|
|
-fsanitize=thread)
|
|
|
|
|
|
|
|
target_link_options(zm-compile-option-interface
|
|
|
|
INTERFACE
|
|
|
|
-fsanitize=thread)
|
|
|
|
|
|
|
|
message(STATUS "GCC: Enabled ThreadSanitizer (TSan)")
|
|
|
|
endif()
|