File tree 4 files changed +13
-9
lines changed 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,14 @@ if(ENABLE_FUZZING)
42
42
endif ()
43
43
target_link_libraries (simdjson-fuzzer INTERFACE simdjson-flags )
44
44
target_link_libraries (simdjson-fuzzer INTERFACE ${SIMDJSON_FUZZ_LDFLAGS} )
45
-
45
+
46
+ # Define the fuzzers
47
+ add_custom_target (all_fuzzers)
48
+
46
49
function (implement_fuzzer name )
47
50
add_executable (${name} ${name} .cpp)
48
51
target_link_libraries (${name} PRIVATE simdjson-fuzzer)
52
+ add_dependencies (all_fuzzers ${name} )
49
53
add_test (${name} ${name} )
50
54
set_property (TEST ${name} APPEND PROPERTY LABELS fuzz)
51
55
endfunction ()
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ if [ ! -d build-$variant ] ; then
27
27
-DSIMDJSON_FUZZ_LINKMAIN=On \
28
28
-DSIMDJSON_IMPLEMENTATION_HASWELL=0
29
29
30
- ninja
30
+ ninja all_fuzzers
31
31
cd ..
32
32
fi
33
33
@@ -45,7 +45,7 @@ if [ ! -d build-$variant ] ; then
45
45
-DENABLE_FUZZING=On \
46
46
-DSIMDJSON_FUZZ_LINKMAIN=On
47
47
48
- ninja
48
+ ninja all_fuzzers
49
49
cd ..
50
50
fi
51
51
@@ -71,7 +71,7 @@ if [ ! -d build-$variant ] ; then
71
71
-DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE \
72
72
-DSIMDJSON_IMPLEMENTATION_HASWELL=0
73
73
74
- ninja
74
+ ninja all_fuzzers
75
75
cd ..
76
76
fi
77
77
@@ -99,7 +99,7 @@ if which clang++-9 >/dev/null 2>&1 ; then
99
99
-DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE \
100
100
-DSIMDJSON_IMPLEMENTATION_HASWELL=0
101
101
102
- ninja
102
+ ninja all_fuzzers
103
103
cd ..
104
104
fi
105
105
else
@@ -127,7 +127,7 @@ if [ ! -d build-$variant ] ; then
127
127
-DSIMDJSON_FUZZ_LINKMAIN=Off \
128
128
-DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE
129
129
130
- ninja
130
+ ninja all_fuzzers
131
131
cd ..
132
132
fi
133
133
@@ -152,7 +152,7 @@ if which clang++-9 >/dev/null 2>&1 ; then
152
152
-DSIMDJSON_FUZZ_LINKMAIN=Off \
153
153
-DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE
154
154
155
- ninja
155
+ ninja all_fuzzers
156
156
157
157
cd ..
158
158
fi
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ if [ ! -d $bdir ] ; then
26
26
-DSIMDJSON_BUILD_STATIC=On \
27
27
-DENABLE_FUZZING=On \
28
28
-DSIMDJSON_FUZZ_LINKMAIN=On
29
- ninja
29
+ ninja all_fuzzers
30
30
cd ..
31
31
fi
32
32
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ cmake .. \
34
34
-DSIMDJSON_FUZZ_LINKMAIN=Off \
35
35
-DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE
36
36
37
- cmake --build .
37
+ cmake --build . --target all_fuzzers
38
38
39
39
cp fuzz/fuzz_* $OUT
40
40
You can’t perform that action at this time.
0 commit comments