Add elfio_fuzzer to tests' compilation

This commit is contained in:
Serge Lamikhov-Center 2022-06-21 09:49:46 +03:00
parent 9d6984a59b
commit ef2fa127c0

View File

@ -54,6 +54,25 @@ add_test(
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR})
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_executable(
elfio_fuzzer
elfio_fuzzer.cpp)
target_link_libraries(
elfio_fuzzer
PRIVATE
elfio::elfio)
target_compile_options(elfio_fuzzer
PRIVATE $<$<C_COMPILER_ID:Clang>:-g -O1 -fsanitize=fuzzer>
)
target_link_libraries(elfio_fuzzer
PRIVATE $<$<C_COMPILER_ID:Clang>:-fsanitize=fuzzer>
)
endif()
add_dependencies(check ELFIOTest)
include(GoogleTest)