Skip to content

Commit

Permalink
small improvement in the fuzz cmake script
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Jan 1, 2018
1 parent 3058e92 commit eb1d544
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/fuzz/CMakeLists.txt
Expand Up @@ -82,16 +82,12 @@ add_fuzzer(fuzz_binary_decode fuzz_binary_decode.cc)

file(GLOB CORPUS_FILES ${PROJECT_SOURCE_DIR}/tests/fuzz/fuzz_binary_message_corpus/generated/*)

set(CORPUS_CMDS)

SET(CORPUS_CMDS "")
FOREACH(f ${CORPUS_FILES})
LIST(APPEND CORPUS_CMDS COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/fuzz_binary_message "${f}")
ENDFOREACH(f)

add_custom_target(
run_fuzzer
${CORPUS_CMDS}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS ${FUZZER_TARGETS}
${MAYBE_USES_TERMINAL})
add_custom_target(run_fuzzer ${CORPUS_CMDS}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS ${FUZZER_TARGETS}
${MAYBE_USES_TERMINAL})

0 comments on commit eb1d544

Please sign in to comment.