summaryrefslogtreecommitdiff
path: root/tomlplusplus/fuzzing/build.sh
blob: 3fce82ae508309887f83c067b5d272fae5239c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cd $SRC/tomlplusplus
mkdir -p build
cmake -S . -B build -DBUILD_FUZZER=ON && cmake --build build --target install

# Build the corpus using the existing toml files in the source
mkdir -p corpus
find $SRC/tomlplusplus -name "*.toml" -exec cp {} corpus \;
zip -q -j $OUT/toml_fuzzer_seed_corpus.zip corpus/*

# Build unit test
clang++ -std=c++17 -O2 -DUSE_VENDORED_LIBS=1 \
    -Iinclude -Itests \
    tests/at_path.cpp \
    tests/conformance_burntsushi_invalid.cpp \
    tests/conformance_burntsushi_valid.cpp \
    tests/conformance_iarna_invalid.cpp \
    tests/conformance_iarna_valid.cpp \
    tests/formatters.cpp \
    tests/for_each.cpp \
    tests/impl_toml.cpp \
    tests/main.cpp \
    tests/manipulating_arrays.cpp \
    tests/manipulating_parse_result.cpp \
    tests/manipulating_tables.cpp \
    tests/manipulating_values.cpp \
    tests/parsing_arrays.cpp \
    tests/parsing_booleans.cpp \
    tests/parsing_comments.cpp \
    tests/parsing_dates_and_times.cpp \
    tests/parsing_floats.cpp \
    tests/parsing_integers.cpp \
    tests/parsing_key_value_pairs.cpp \
    tests/parsing_spec_example.cpp \
    tests/parsing_strings.cpp \
    tests/parsing_tables.cpp \
    tests/path.cpp \
    tests/tests.cpp \
    tests/user_feedback.cpp \
    tests/using_iterators.cpp \
    tests/visit.cpp \
    tests/windows_compat.cpp \
    -o unit_tests \
    -pthread