-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
202 lines (179 loc) · 4.15 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_POLICY(SET CMP0003 NEW)
PROJECT(ithitools C CXX)
OPTION(PRIVACY_CONSCIOUS "Compile extensions -Y and -E" OFF)
IF(PRIVACY_CONSCIOUS)
ADD_DEFINITIONS(-DPRIVACY_CONSCIOUS)
ENDIF(PRIVACY_CONSCIOUS)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_C_FLAGS "-std=c99 -Wall -O2 -g ${CC_WARNING_FLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_C_FLAGS "-Wall -O2 -g ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-Wall -O2 -g ${CMAKE_CXX_FLAGS}")
INCLUDE_DIRECTORIES(src lib test include cdns/lib)
SET(ITHITOOLS_LIBRARY_HEADERS
lib/AddressFilter.h
lib/CaptureSummary.h
lib/ComputeM34.h
lib/ComputeM6.h
lib/ComputeMetric.h
lib/config.h
lib/CsvHelper.h
lib/dnscap_common.h
lib/DnsStats.h
lib/DnsTypes.h
lib/HashBinGeneric.h
lib/ipstats.h
lib/ithimetrics.h
lib/ithipublisher.h
lib/ithiutil.h
lib/ithi_getopt.h
lib/linktype.h
lib/M1Data.h
lib/M2Data.h
lib/M7Getter.h
lib/NamePattern.h
lib/OdiPublisher.h
lib/pcap_reader.h
lib/QNameMinimization.h
lib/TldAsKey.h
lib/UsefulTransaction.h
lib/Version.h
)
SET(ITHITOOLS_LIBRARY_FILES
lib/AddressFilter.cpp
lib/CaptureSummary.cpp
cdns/lib/cbor.cpp
cdns/lib/cdns.cpp
lib/DnscapPlugIn.cpp
lib/DnsStats.cpp
lib/ipstats.cpp
lib/ithimetrics.cpp
lib/ithipublisher.cpp
lib/ithiutil.cpp
lib/pcap_reader.cpp
lib/NamePattern.cpp
lib/getopt.c
lib/M7Getter.cpp
lib/CsvHelper.cpp
lib/M1Data.cpp
lib/M2Data.cpp
lib/ComputeMetric.cpp
lib/ComputeM34.cpp
lib/ComputeM6.cpp
lib/OdiPublisher.cpp
)
add_library(ithitools-core ${ITHITOOLS_LIBRARY_HEADERS} ${ITHITOOLS_LIBRARY_FILES})
target_include_directories(ithitools-core
PUBLIC
lib
cdns/lib)
SET(ITHITOOLS_TEST_LIBRARY_HEADERS
test/CaptureTest.h
test/CdnsCaptureTest.h
test/CsvTest.h
test/DnsPrefixTest.h
test/GetNameTest.h
test/hashtest.h
test/HyperLogLogTest.h
test/IPStatsTest.h
test/ithi_test_class.h
test/LoadTest.h
test/M1DataTest.h
test/M2DataTest.h
test/MergeTest.h
test/MetricTest.h
test/OdiPublishTest.h
test/PatternTest.h
test/PluginTest.h
test/PublishTest.h
test/QNameTest.h
test/SaveTest.h
test/StatsByIpTest.h
test/testRfc6761.h
test/TldCountTest.h
cdns/lib/cbor.cpp
cdns/lib/cdns.cpp
)
SET(ITHITOOLS_TEST_LIBRARY_FILES
test/CaptureTest.cpp
test/capture_fuzz.cpp
test/CdnsCaptureTest.cpp
test/CsvTest.cpp
test/DnsPrefixTest.cpp
test/GetNameTest.cpp
test/hashtest.cpp
test/HyperLogLogTest.cpp
test/IPStatsTest.cpp
test/ithitest.cpp
test/ithi_test_class.cpp
test/LoadTest.cpp
test/M1DataTest.cpp
test/M2DataTest.cpp
test/MergeTest.cpp
test/MetricTest.cpp
test/OdiPublishTest.cpp
test/PatternTest.cpp
test/PluginTest.cpp
test/PublishTest.cpp
test/QNameTest.cpp
test/SaveTest.cpp
test/StatsByIpTest.cpp
test/testRfc6761.cpp
test/TldCountTest.cpp
)
add_library(ithitools-test ${ITHITOOLS_LIBRARY_HEADERS}
${ITHITOOLS_TEST_LIBRARY_HEADERS}
${ITHITOOLS_TEST_LIBRARY_FILES})
target_include_directories(ithitools-test
PUBLIC
lib
test
)
ADD_EXECUTABLE(ithitools
src/ithitools.cpp
)
target_link_libraries(ithitools
PRIVATE
ithitools-core
)
target_include_directories(ithitools
PUBLIC
lib
)
ADD_EXECUTABLE(ithitest
src/ithitest.cpp
)
target_link_libraries(ithitest
PRIVATE
ithitools-test
ithitools-core
)
target_include_directories(ithitest
PUBLIC
lib
test
)
ADD_LIBRARY(ithicap SHARED
lib/AddressFilter.cpp
lib/CaptureSummary.cpp
cdns/lib/cbor.cpp
cdns/lib/cdns.cpp
lib/DnsStats.cpp
lib/ipstats.cpp
lib/ithiutil.cpp
lib/pcap_reader.cpp
lib/UsefulTransaction.cpp
lib/NamePattern.cpp
lib/CsvHelper.cpp
lib/DnscapPlugIn.cpp
lib/getopt.c
)
SET_TARGET_PROPERTIES(ithicap PROPERTIES
VERSION 2.05
PUBLIC_HEADER include/ithicap.h)
SET_TARGET_PROPERTIES(ithitools PROPERTIES VERSION 2.05)
SET(TEST_EXES ithitest)
INSTALL(TARGETS ithitools ithicap
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include)