Skip to content

Commit 075a25a

Browse files
PatKaminszadam
authored andcommitted
Add fuzzer options globally
1 parent 5971b36 commit 075a25a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ 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
170+
AND CMAKE_CXX_COMPILER_ID MATCHES "Clang"
171+
AND LINUX)
172+
add_compile_options("-fsanitize=fuzzer-no-link")
173+
add_link_options("-fsanitize=fuzzer-no-link")
174+
endif()
168175

169176
# A header only library to specify include directories in transitive
170177
# dependencies.

0 commit comments

Comments
 (0)