-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
45 lines (34 loc) · 925 Bytes
/
CMakeLists.txt
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
44
cmake_minimum_required(VERSION 2.8)
project(pot-c-fuzz)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake" ${CMAKE_MODULE_PATH})
find_package(Sanitizers)
include_directories(../src)
include_directories(../tests)
include_directories(../src/external/tweetnacl_modified)
include_directories(.)
option(USE_SANITIZERS "Use Adress sanitizers" OFF)
set(SOURCES
../src/salt.c
../src/salti_handshake.c
../src/salti_util.c
util.c
crypt_mock.c
test_data_mock.c
)
add_library(salt ${SOURCES})
if(USE_SANITIZERS)
add_sanitizers(salt)
else(USE_SANITIZERS)
endif(USE_SANITIZERS)
macro(add_fuzz arg)
add_executable(${arg} ${arg}.c)
if(USE_SANITIZERS)
add_sanitizers(${arg})
endif(USE_SANITIZERS)
target_link_libraries(${arg} salt)
endmacro(add_fuzz)
add_fuzz(fuzz_client)
add_fuzz(fuzz_a2_client)
add_fuzz(fuzz_a1a2_host)
add_fuzz(fuzz_no_a1a2_host)
add_fuzz(fuzz_read_parse)