summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers/CMakeLists.txt
blob: 5eade80398cdcb7f2877e44e6b1cd2d8391b489b (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
function(add_simple_fuzzer name)
  add_executable(${name} "${name}.cpp")
  target_compile_options(${name}
      PRIVATE $<$<C_COMPILER_ID:Clang>:-g -O1 -fsanitize=fuzzer>
      )
  target_link_libraries(${name}
      PUBLIC Lagom
      PRIVATE $<$<C_COMPILER_ID:Clang>:-fsanitize=fuzzer>
      )
endfunction()

add_simple_fuzzer(FuzzBMP)
add_simple_fuzzer(FuzzELF)
add_simple_fuzzer(FuzzGemini)
add_simple_fuzzer(FuzzGIFLoader)
add_simple_fuzzer(FuzzJPGLoader)
add_simple_fuzzer(FuzzPPMLoader)
add_simple_fuzzer(FuzzJs)
add_simple_fuzzer(FuzzMarkdown)

add_executable(FuzzilliJs FuzzilliJs.cpp)
target_compile_options(FuzzilliJs
    PRIVATE $<$<C_COMPILER_ID:Clang>:-g -O1 -fsanitize-coverage=trace-pc-guard>
    )
target_link_libraries(FuzzilliJs
    PUBLIC Lagom
    PRIVATE $<$<C_COMPILER_ID:Clang>:-fsanitize-coverage=trace-pc-guard>
    )