diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-10-24 19:51:10 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-10-24 19:51:10 -0700 |
commit | 703c9c2120effe49546097f4e5866251378f320c (patch) | |
tree | f8586619b1312cde75734bf6e9258e22498ac461 /testprogs/fuzz/CMakeLists.txt | |
parent | 392914eaf691f7cb0a80d59bffe090cffbab8b93 (diff) | |
download | libpcap-703c9c2120effe49546097f4e5866251378f320c.tar.gz |
Attempt to deal with OSes that require you to link with -lpthread.
Leave CMAKE_EXE_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS alone;
instead, just add SANITIZER_FLAGS as the LINK_FLAGS property to shared
library and executable targets.
Diffstat (limited to 'testprogs/fuzz/CMakeLists.txt')
-rw-r--r-- | testprogs/fuzz/CMakeLists.txt | 12 |
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() |