-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (28 loc) · 1.69 KB
/
Copy pathCMakeLists.txt
File metadata and controls
32 lines (28 loc) · 1.69 KB
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
cmake_minimum_required(VERSION 3.11.4)
project (impcheck_modules)
add_definitions("-std=gnu99 -Wall -Wextra -Werror -pedantic-errors -flto -g")
if(IMPCHECK_WRITE_DIRECTIVES)
add_definitions("-DIMPCHECK_WRITE_DIRECTIVES=${IMPCHECK_WRITE_DIRECTIVES}")
endif()
if(IMPCHECK_FLUSH_ALWAYS)
add_definitions("-DIMPCHECK_FLUSH_ALWAYS=${IMPCHECK_FLUSH_ALWAYS}")
endif()
if(IMPCHECK_OVERRIDE_SALT)
file(WRITE src/trusted/salt.h "#define IMPCHECK_SALT " ${IMPCHECK_OVERRIDE_SALT})
else()
execute_process(COMMAND bash "-c" "dd if=/dev/urandom count=8 bs=1 2>/dev/null | od -t u8 | awk '{print $2\"UL\"}' | head -1" OUTPUT_VARIABLE IMPCHECK_SALT)
file(WRITE src/trusted/salt.h "#define IMPCHECK_SALT " ${IMPCHECK_SALT})
endif()
add_executable(impcheck_parse
src/trusted/hash.c src/trusted/secret.c src/trusted/siphash.c src/trusted/trusted_parser.c src/trusted/trusted_utils.c src/trusted/vectors.c src/writer.c
src/trusted/main_parse.c)
add_executable(impcheck_check
src/trusted/confirm.c src/trusted/hash.c src/trusted/lrat_check.c src/trusted/secret.c src/trusted/siphash.c src/trusted/trusted_checker.c src/trusted/top_check.c src/trusted/trusted_utils.c src/trusted/vectors.c src/writer.c
src/trusted/main_check.c)
add_executable(impcheck_confirm
src/trusted/confirm.c src/trusted/hash.c src/trusted/secret.c src/trusted/siphash.c src/trusted/trusted_parser.c src/trusted/trusted_utils.c src/trusted/vectors.c src/writer.c
src/trusted/main_confirm.c)
add_executable(test_hash src/trusted/trusted_utils.c src/trusted/hash.c src/writer.c test/test.c
test/test_hash.c)
add_executable(test_full src/trusted/trusted_utils.c src/writer.c test/test.c src/trusted/vectors.c
test/test_full.c)