Skip to content

Commit 9547f74

Browse files
PatKaminszadam
authored andcommitted
Add fuzzer options globally
1 parent 5971b36 commit 9547f74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ if(USE_MSAN)
165165
"prevent reporting false-positives")
166166
add_sanitizer_flag(memory)
167167
endif()
168+
# Fuzzer instrumentation for the whole library
169+
if(UMF_BUILD_FUZZTESTS AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND LINUX)
170+
add_compile_options("-fsanitize=fuzzer-no-link")
171+
add_link_options("-fsanitize=fuzzer-no-link")
172+
endif()
168173

169174
# A header only library to specify include directories in transitive
170175
# dependencies.

0 commit comments

Comments
 (0)