2018-02-04 11:49:13 +01:00
|
|
|
project(fuzzing CXX)
|
|
|
|
|
2018-04-10 11:13:57 +02:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
2019-02-02 16:28:38 +01:00
|
|
|
add_executable(ssh_client_fuzzer ssh_client_fuzzer.cpp)
|
|
|
|
target_link_libraries(ssh_client_fuzzer
|
|
|
|
PRIVATE
|
2019-11-06 09:06:05 +01:00
|
|
|
ssh::static)
|
2019-02-02 16:28:38 +01:00
|
|
|
set_target_properties(ssh_client_fuzzer
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS "-fsanitize=fuzzer"
|
|
|
|
LINK_FLAGS "-fsanitize=fuzzer")
|
|
|
|
|
|
|
|
|
2018-04-10 11:13:57 +02:00
|
|
|
add_executable(ssh_server_fuzzer ssh_server_fuzzer.cpp)
|
2019-01-25 11:18:23 +01:00
|
|
|
target_link_libraries(ssh_server_fuzzer
|
|
|
|
PRIVATE
|
2019-11-06 09:06:05 +01:00
|
|
|
ssh::static)
|
2018-04-10 11:13:57 +02:00
|
|
|
set_target_properties(ssh_server_fuzzer
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS "-fsanitize=fuzzer"
|
|
|
|
LINK_FLAGS "-fsanitize=fuzzer")
|
2019-07-06 17:12:16 +02:00
|
|
|
|
|
|
|
# Run the fuzzer to make sure it works
|
2019-02-02 16:28:38 +01:00
|
|
|
add_test(ssh_client_fuzzer ${CMAKE_CURRENT_BINARY_DIR}/ssh_client_fuzzer -runs=1)
|
2019-07-06 17:12:16 +02:00
|
|
|
add_test(ssh_server_fuzzer ${CMAKE_CURRENT_BINARY_DIR}/ssh_server_fuzzer -runs=1)
|
2018-04-10 11:13:57 +02:00
|
|
|
endif()
|