zoneminder/cmake/compiler/clang/settings.cmake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
834 B
CMake
Raw Normal View History

target_compile_options(zm-warning-interface
INTERFACE
-Wall
-Wextra
-Wno-unused-parameter)
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 "Clang: Enabled AddressSanitizer (ASan)")
endif()
if(TSAN)
target_compile_options(zm-compile-option-interface
INTERFACE
-fsanitize=thread)
target_link_options(zm-compile-option-interface
INTERFACE
-fsanitize=thread)
message(STATUS "Clang: Enabled ThreadSanitizer (TSan)")
endif()