2020-05-27 05:15:46 +02:00
|
|
|
if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
2022-02-06 13:02:52 +01:00
|
|
|
set(fuzz-client_SRC
|
2020-03-31 09:33:58 +02:00
|
|
|
main.cpp
|
2020-04-19 17:46:07 +02:00
|
|
|
type2.cpp
|
2022-02-06 13:02:52 +01:00
|
|
|
)
|
|
|
|
if(USE_BUNDLED_TINYXML2)
|
|
|
|
list(APPEND fuzz-client_SRC $<TARGET_OBJECTS:tinyxml2_objs>)
|
|
|
|
endif()
|
|
|
|
add_executable(fuzz-client EXCLUDE_FROM_ALL
|
|
|
|
${fuzz-client_SRC}
|
2020-11-21 07:44:22 +01:00
|
|
|
$<TARGET_OBJECTS:simplecpp_objs>
|
|
|
|
$<TARGET_OBJECTS:lib_objs>)
|
2022-02-06 13:02:52 +01:00
|
|
|
target_include_directories(fuzz-client PRIVATE ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp ${CMAKE_SOURCE_DIR}/externals)
|
|
|
|
if(USE_BUNDLED_TINYXML2)
|
|
|
|
target_include_directories(fuzz-client PRIVATE ${CMAKE_SOURCE_DIR}/externals/tinyxml2/)
|
|
|
|
endif()
|
2020-03-31 09:33:58 +02:00
|
|
|
target_compile_options(fuzz-client PRIVATE -fsanitize=fuzzer)
|
2020-11-21 07:44:22 +01:00
|
|
|
# TODO: target_link_options() requires CMake >= 3.13
|
|
|
|
#target_link_options(fuzz-client PRIVATE -fsanitize=fuzzer)
|
|
|
|
target_link_libraries(fuzz-client PRIVATE -fsanitize=fuzzer)
|
|
|
|
if (HAVE_RULES)
|
|
|
|
target_link_libraries(fuzz-client PRIVATE ${PCRE_LIBRARY})
|
|
|
|
endif()
|
|
|
|
if (USE_Z3)
|
|
|
|
target_link_libraries(fuzz-client PRIVATE ${Z3_LIBRARIES})
|
|
|
|
endif()
|
2022-02-06 13:02:52 +01:00
|
|
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
|
|
|
target_link_libraries(fuzz-client PRIVATE tinyxml2)
|
|
|
|
endif()
|
2020-03-31 09:33:58 +02:00
|
|
|
|
2020-04-08 14:56:12 +02:00
|
|
|
add_executable(translate EXCLUDE_FROM_ALL
|
2020-03-31 09:33:58 +02:00
|
|
|
translate.cpp
|
|
|
|
type2.cpp)
|
2020-04-19 17:46:07 +02:00
|
|
|
endif()
|