summaryrefslogtreecommitdiff
path: root/testprogs/fuzz/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs/fuzz/CMakeLists.txt')
-rw-r--r--testprogs/fuzz/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/testprogs/fuzz/CMakeLists.txt b/testprogs/fuzz/CMakeLists.txt
index 3376a98c..4a2862f9 100644
--- a/testprogs/fuzz/CMakeLists.txt
+++ b/testprogs/fuzz/CMakeLists.txt
@@ -1,8 +1,20 @@
add_executable(fuzz_pcap onefile.c fuzz_pcap.c)
target_link_libraries(fuzz_pcap ${ARGN} ${LIBRARY_NAME}_static ${PCAP_LINK_LIBRARIES})
+if(NOT "${SANITIZER_FLAGS}" STREQUAL "")
+ set_target_properties(fuzz_pcap PROPERTIES
+ LINK_FLAGS "${SANITIZER_FLAGS}")
+endif()
add_executable(fuzz_filter onefile.c fuzz_filter.c)
target_link_libraries(fuzz_filter ${ARGN} ${LIBRARY_NAME}_static ${PCAP_LINK_LIBRARIES})
+if(NOT "${SANITIZER_FLAGS}" STREQUAL "")
+ set_target_properties(fuzz_filter PROPERTIES
+ LINK_FLAGS "${SANITIZER_FLAGS}")
+endif()
add_executable(fuzz_both onefile.c fuzz_both.c)
target_link_libraries(fuzz_both ${ARGN} ${LIBRARY_NAME}_static ${PCAP_LINK_LIBRARIES})
+if(NOT "${SANITIZER_FLAGS}" STREQUAL "")
+ set_target_properties(fuzz_both PROPERTIES
+ LINK_FLAGS "${SANITIZER_FLAGS}")
+endif()