File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,26 +9,12 @@ if(MSVC)
99 add_compile_options (-D_CRT_SECURE_NO_WARNINGS )
1010endif ()
1111
12- add_executable (msgpack_reproducer
13- msgpack_fuzzer.cpp
14- reproducer.cpp
15- )
16- target_link_libraries (msgpack_reproducer
17- ArduinoJson
18- )
19-
20- add_executable (json_reproducer
21- json_fuzzer.cpp
22- reproducer.cpp
23- )
24- target_link_libraries (json_reproducer
25- ArduinoJson
26- )
27-
28- macro (add_fuzzer name )
12+ function (add_fuzzer name )
2913 set (FUZZER "${name} _fuzzer" )
14+ set (REPRODUCER "${FUZZER} _reproducer" )
3015 set (CORPUS_DIR "${CMAKE_CURRENT_SOURCE_DIR} /${name} _corpus" )
3116 set (SEED_CORPUS_DIR "${CMAKE_CURRENT_SOURCE_DIR} /${name} _seed_corpus" )
17+
3218 add_executable ("${FUZZER} "
3319 "${name} _fuzzer.cpp"
3420 )
@@ -45,12 +31,19 @@ macro(add_fuzzer name)
4531 NAME "${FUZZER} "
4632 COMMAND "${FUZZER} " "${CORPUS_DIR} " "${SEED_CORPUS_DIR} " -max_total_time=5 -timeout=1
4733 )
48-
4934 set_tests_properties ("${FUZZER} "
5035 PROPERTIES
5136 LABELS "Fuzzing"
5237 )
53- endmacro ()
38+
39+ add_executable ("${REPRODUCER} "
40+ "${name} _fuzzer.cpp"
41+ reproducer.cpp
42+ )
43+ target_link_libraries ("${REPRODUCER} "
44+ ArduinoJson
45+ )
46+ endfunction ()
5447
5548# Needs Clang 6+ to compile
5649if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6)
You can’t perform that action at this time.
0 commit comments