File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,14 @@ if(ENABLE_FUZZING)
4242 endif ()
4343 target_link_libraries (simdjson-fuzzer INTERFACE simdjson-flags )
4444 target_link_libraries (simdjson-fuzzer INTERFACE ${SIMDJSON_FUZZ_LDFLAGS} )
45-
45+
46+ # Define the fuzzers
47+ add_custom_target (all_fuzzers )
48+
4649 function (implement_fuzzer name )
4750 add_executable (${name} ${name} .cpp )
4851 target_link_libraries (${name} PRIVATE simdjson-fuzzer )
52+ add_dependencies (all_fuzzers ${name} )
4953 add_test (${name} ${name} )
5054 set_property (TEST ${name} APPEND PROPERTY LABELS fuzz )
5155 endfunction ()
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ if [ ! -d build-$variant ] ; then
2727 -DSIMDJSON_FUZZ_LINKMAIN=On \
2828 -DSIMDJSON_IMPLEMENTATION_HASWELL=0
2929
30- ninja
30+ ninja all_fuzzers
3131 cd ..
3232fi
3333
@@ -45,7 +45,7 @@ if [ ! -d build-$variant ] ; then
4545 -DENABLE_FUZZING=On \
4646 -DSIMDJSON_FUZZ_LINKMAIN=On
4747
48- ninja
48+ ninja all_fuzzers
4949 cd ..
5050fi
5151
@@ -71,7 +71,7 @@ if [ ! -d build-$variant ] ; then
7171 -DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE \
7272 -DSIMDJSON_IMPLEMENTATION_HASWELL=0
7373
74- ninja
74+ ninja all_fuzzers
7575 cd ..
7676fi
7777
@@ -99,7 +99,7 @@ if which clang++-9 >/dev/null 2>&1 ; then
9999 -DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE \
100100 -DSIMDJSON_IMPLEMENTATION_HASWELL=0
101101
102- ninja
102+ ninja all_fuzzers
103103 cd ..
104104 fi
105105else
@@ -127,7 +127,7 @@ if [ ! -d build-$variant ] ; then
127127 -DSIMDJSON_FUZZ_LINKMAIN=Off \
128128 -DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE
129129
130- ninja
130+ ninja all_fuzzers
131131 cd ..
132132fi
133133
@@ -152,7 +152,7 @@ if which clang++-9 >/dev/null 2>&1 ; then
152152 -DSIMDJSON_FUZZ_LINKMAIN=Off \
153153 -DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE
154154
155- ninja
155+ ninja all_fuzzers
156156
157157 cd ..
158158 fi
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ if [ ! -d $bdir ] ; then
2626 -DSIMDJSON_BUILD_STATIC=On \
2727 -DENABLE_FUZZING=On \
2828 -DSIMDJSON_FUZZ_LINKMAIN=On
29- ninja
29+ ninja all_fuzzers
3030 cd ..
3131fi
3232
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ cmake .. \
3434-DSIMDJSON_FUZZ_LINKMAIN=Off \
3535-DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE
3636
37- cmake --build .
37+ cmake --build . --target all_fuzzers
3838
3939cp fuzz/fuzz_* $OUT
4040
You can’t perform that action at this time.
0 commit comments