diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-04-10 11:13:57 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-04-10 11:13:57 +0200 |
commit | 6026fc80369ba588a10d6d1abe1767e379a5b97b (patch) | |
tree | d69049836dbc1d189b27bdb2f5d5d173d634b6e3 /tests | |
parent | 2cc5b5865c9e6f24bb7ab686fd6595ba3a231f92 (diff) | |
download | libssh-6026fc80369ba588a10d6d1abe1767e379a5b97b.tar.gz libssh-6026fc80369ba588a10d6d1abe1767e379a5b97b.tar.xz libssh-6026fc80369ba588a10d6d1abe1767e379a5b97b.zip |
cmake: Fix libfuzzer linking with clang6
This is always available using -fsanitize=fuzzer now.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fuzz/CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt index b34ca66a..c3e350be 100644 --- a/tests/fuzz/CMakeLists.txt +++ b/tests/fuzz/CMakeLists.txt @@ -1,9 +1,13 @@ project(fuzzing CXX) -find_package(ClangFuzzer) +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + add_executable(ssh_server_fuzzer ssh_server_fuzzer.cpp) + set_target_properties(ssh_server_fuzzer + PROPERTIES + COMPILE_FLAGS "-fsanitize=fuzzer" + LINK_FLAGS "-fsanitize=fuzzer") -add_executable(ssh_server_fuzzer ssh_server_fuzzer.cpp) -target_link_libraries(ssh_server_fuzzer - ${CLANG_FUZZER_LIBRARY} - ${LIBSSH_THREADS_STATIC_LIBRARY} - ${LIBSSH_THREADS_LINK_LIBRARIES}) + target_link_libraries(ssh_server_fuzzer + ${LIBSSH_THREADS_STATIC_LIBRARY} + ${LIBSSH_THREADS_LINK_LIBRARIES}) +endif() |