boringssl/fuzz/CMakeLists.txt
Adam Langley 9c969bf491 Switch to Clang 6.0's fuzzer support.
With Clang 6.0, libFuzzer is now included and there's a new
-fsanitize=fuzzer command to enable the needed compiler actions.

Change-Id: If8c0d649f494655c5bb1e55ebdbf39450940c75b
Reviewed-on: https://boringssl-review.googlesource.com/31324
Reviewed-by: David Benjamin <davidben@google.com>
2018-08-27 17:18:56 +00:00

24 lines
528 B
CMake

include_directories(../include)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-prototypes")
macro(fuzzer name)
add_executable(${name} ${name}.cc)
target_link_libraries(${name} crypto ${ARGN})
set_target_properties(${name} PROPERTIES LINK_FLAGS "-fsanitize=fuzzer")
endmacro()
fuzzer(bn_mod_exp)
fuzzer(privkey)
fuzzer(cert)
fuzzer(spki)
fuzzer(pkcs8)
fuzzer(pkcs12)
fuzzer(read_pem)
fuzzer(server ssl)
fuzzer(client ssl)
fuzzer(dtls_server ssl)
fuzzer(dtls_client ssl)
fuzzer(ssl_ctx_api ssl)
fuzzer(session ssl)