-
Notifications
You must be signed in to change notification settings - Fork 170
/
CMakeLists.txt
99 lines (78 loc) · 2.98 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
cmake_minimum_required (VERSION 2.6)
project (Preeny)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(common-preeny STATIC src/logging.c)
# Malloc
add_library(crazyrealloc SHARED src/crazyrealloc.c)
target_link_libraries(crazyrealloc common-preeny dl)
add_library(mallocwatch SHARED src/mallocwatch.c)
target_link_libraries(mallocwatch common-preeny dl)
# Signals
add_library(dealarm SHARED src/dealarm.c)
target_link_libraries(dealarm common-preeny)
add_library(desigact SHARED src/desigact.c)
target_link_libraries(desigact common-preeny)
add_library(startstop SHARED src/startstop.c)
target_link_libraries(startstop common-preeny)
# Defork
add_library(defork SHARED src/defork.c)
target_link_libraries(defork common-preeny)
# Deptrace
add_library(deptrace SHARED src/deptrace.c)
target_link_libraries(deptrace common-preeny)
# Sleep
add_library(desleep SHARED src/desleep.c)
target_link_libraries(desleep common-preeny)
# Socket
add_library(desock SHARED src/desock.c)
target_link_libraries(desock common-preeny dl pthread)
add_library(desock_dup SHARED src/desock_dup.c)
target_link_libraries(desock_dup common-preeny dl)
add_library(ensock SHARED src/ensock.c)
target_link_libraries(ensock common-preeny dl)
add_library(writeout SHARED src/writeout.c)
target_link_libraries(writeout common-preeny dl)
# Random
add_library(desrand SHARED src/desrand.c)
target_link_libraries(desrand common-preeny dl)
add_library(derand SHARED src/derand.c)
target_link_libraries(derand common-preeny dl)
# Time
add_library(detime SHARED src/detime.c)
target_link_libraries(detime common-preeny dl)
# UID
add_library(deuid SHARED src/deuid.c)
target_link_libraries(deuid common-preeny dl)
# Patch
add_library(patch SHARED src/patch.c)
target_link_libraries(patch common-preeny ini_config dl)
# EOF killer
add_library(eofkiller SHARED src/eofkiller.c)
target_link_libraries(eofkiller common-preeny dl)
# Canary
add_library(getcanary SHARED src/getcanary.c)
target_link_libraries(getcanary common-preeny dl)
add_library(setcanary SHARED src/setcanary.c)
target_link_libraries(setcanary common-preeny dl)
# SetSTDIN
add_library(setstdin SHARED src/setstdin.c)
target_link_libraries(setstdin common-preeny dl)
# nowrite
add_library(nowrite SHARED src/nowrite.c)
target_link_libraries(nowrite common-preeny dl)
# Tests
add_executable(test_hello test/hello.c)
add_executable(test_rand test/rand.c)
add_executable(test_realloc test/realloc.c)
add_executable(test_sleep test/sleep.c)
add_executable(test_sock test/sock.c)
add_executable(test_uid test/uid.c)
add_executable(test_setstdin_read test/setstdin_read.c)
add_executable(test_setstdin_fread test/setstdin_fread.c)
add_executable(test_setstdin_getc test/setstdin_getc.c)
add_executable(test_nowrite test/nowrite.c)
# Scripts
file(COPY ${CMAKE_SOURCE_DIR}/test/run_tests.sh DESTINATION ${CMAKE_BINARY_DIR})