Some checks failed
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m34s
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 2m46s
sm-rpc / build (Debug, host.gcc) (push) Failing after 1m28s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 2m14s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 2m8s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 5m35s
sm-rpc / build (Release, host.gcc) (push) Failing after 1m55s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 7m21s
50 lines
1.3 KiB
CMake
50 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.5.1...3.29.0)
|
|
|
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|
enable_language(CXX)
|
|
|
|
if(DEFINED ENV{LIB_FUZZING_ENGINE})
|
|
set(FUZZING_ENGINE $ENV{LIB_FUZZING_ENGINE})
|
|
set(FUZZING_ENGINE_FOUND ON)
|
|
else()
|
|
find_library(FUZZING_ENGINE "FuzzingEngine")
|
|
endif()
|
|
endif()
|
|
|
|
set(FUZZERS
|
|
fuzzer_checksum
|
|
fuzzer_compress
|
|
fuzzer_example_small
|
|
fuzzer_example_large
|
|
fuzzer_example_flush
|
|
fuzzer_example_dict
|
|
)
|
|
|
|
if(WITH_GZFILEOP)
|
|
list(APPEND FUZZERS fuzzer_minigzip)
|
|
endif()
|
|
|
|
foreach(FUZZER ${FUZZERS})
|
|
add_executable(${FUZZER} ${FUZZER}.c)
|
|
|
|
if(NOT FUZZING_ENGINE_FOUND)
|
|
target_sources(${FUZZER} PRIVATE standalone_fuzz_target_runner.c)
|
|
endif()
|
|
|
|
if(NOT DEFINED BUILD_SHARED_LIBS)
|
|
target_link_libraries(${FUZZER} zlibstatic)
|
|
else()
|
|
target_link_libraries(${FUZZER} zlib)
|
|
endif()
|
|
|
|
if(FUZZING_ENGINE_FOUND)
|
|
target_link_libraries(${FUZZER} ${FUZZING_ENGINE})
|
|
endif()
|
|
|
|
if(ZLIB_ENABLE_TESTS)
|
|
file(GLOB FUZZER_TEST_FILES ${PROJECT_SOURCE_DIR}/*)
|
|
set(FUZZER_COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:${FUZZER}> ${FUZZER_TEST_FILES})
|
|
add_test(NAME ${FUZZER} COMMAND ${FUZZER_COMMAND})
|
|
endif()
|
|
endforeach()
|