Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/test/oss-fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ add_custom_target(oss_fuzz ALL
DEPENDS ${OPENEXR_FUZZERS}
)

if ($ENV{FUZZING_ENGINE} STREQUAL "afl")
if ("$ENV{FUZZING_ENGINE}" STREQUAL "afl")
add_library(afl_rt STATIC IMPORTED)
set_target_properties(afl_rt PROPERTIES IMPORTED_LOCATION /src/aflplusplus/afl-compiler-rt.o)
endif()

foreach(fuzzer IN LISTS OPENEXR_FUZZERS)
add_executable(${fuzzer} ${fuzzer}.cc)
target_link_libraries(${fuzzer}
PRIVATE OpenEXR::OpenEXR OpenEXR::OpenEXRUtil $ENV{LIB_FUZZING_ENGINE})
if ($ENV{FUZZING_ENGINE} STREQUAL "afl")
PRIVATE OpenEXR::OpenEXR OpenEXR::OpenEXRUtil "$ENV{LIB_FUZZING_ENGINE}")
if ("$ENV{FUZZING_ENGINE}" STREQUAL "afl")
target_link_libraries(${fuzzer} PRIVATE afl_rt)
endif()
install(TARGETS ${fuzzer}
DESTINATION $ENV{OUT}
DESTINATION "$ENV{OUT}"
COMPONENT oss_fuzz
)

Expand Down
Loading