File: CMakeLists.txt

package info (click to toggle)
zxing-cpp 3.0.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 30,204 kB
  • sloc: ansic: 69,384; cpp: 34,624; php: 2,790; python: 199; makefile: 31; sh: 3
file content (29 lines) | stat: -rw-r--r-- 669 bytes parent folder | download
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
cmake_minimum_required (VERSION 3.16)


set (CMAKE_CXX_COMPILER /usr/bin/clang++) # -fsanitize=fuzzer only available in clang

project (ZXingFuzz)

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -march=native -fsanitize=address,undefined,fuzzer")

set (ZXING_WRITERS BOTH)
set (ZXING_READERS ON)

add_definitions (-DZXING_BUILD_FOR_TEST)
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/../../core ${CMAKE_BINARY_DIR}/ZXing)

set (TESTS
    DBEDecoder
    DMEncoder
    ReadLinear
    ReadMatrix
    DecodeMatrix
)

foreach (test ${TESTS})
    set (name "fuzz${test}")
    add_executable (${name} "${name}.cpp")
    target_link_libraries (${name} ZXing::ZXing)
endforeach()