-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeConfig.txt
209 lines (147 loc) · 6 KB
/
CMakeConfig.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
202
203
204
205
206
207
208
#
# (c) Copyright 2008, Hewlett-Packard Development Company, LP
#
# See the file named COPYING for license details
#
# All of the options and dependencies for the various cmake sub-bits
INCLUDE(LintelCMakeUtil)
#### Default build type
IF(NOT CMAKE_BUILD_TYPE)
MESSAGE("WARNING: you did not set a CMAKE_BUILD_TYPE; assuming RelWithDebInfo")
SET(CMAKE_BUILD_TYPE RelWithDebInfo)
ENDIF(NOT CMAKE_BUILD_TYPE)
#### Shared Libs
OPTION(BUILD_SHARED_LIBS "Should we build shared libraries" ON)
IF(BUILD_SHARED_LIBS)
SET(LIBRARY_TYPE SHARED)
ELSE(BUILD_SHARED_LIBS)
SET(LIBRARY_TYPE STATIC)
ENDIF(BUILD_SHARED_LIBS)
#### Lintel
INCLUDE(FindBoost)
# TODO: extend FindLintel to check for all dependencies again and do something
# useful if the dependencies have vanished.
SET(LINTEL_FIND_REQUIRED ON)
SET(LINTELPTHREAD_FIND_REQUIRED ON)
INCLUDE(FindLintel)
IF(NOT LINTEL_program-options_ENABLED)
MESSAGE("lintel does not support program-options; csv2ds,dsselect,dsrepack,dsrecover"
" will not be built")
ENDIF(NOT LINTEL_program-options_ENABLED)
#### Threads
INCLUDE(FindThreads)
SET(BOOST_THREAD_FIND_REQUIRED ON)
LINTEL_BOOST_EXTRA(BOOST_THREAD boost/thread/tss.hpp "boost_thread boost_thread-mt")
#### LibXML2
INCLUDE(FindLibXml2)
IF(NOT LIBXML2_FOUND)
MESSAGE(FATAL_ERROR "ERROR: DataSeries requires libxml2 to build")
ENDIF(NOT LIBXML2_FOUND)
#### Zlib
INCLUDE(FindZLIB)
IF(NOT ZLIB_FOUND)
MESSAGE(FATAL_ERROR "ERROR: DataSeries requires zlib to build (for adler32 checksum)")
ENDIF(NOT ZLIB_FOUND)
#### BZip2
INCLUDE(FindBZip2)
OPTION(WITH_BZIP2 "Build with bzip2 support?" ON)
IF(WITH_BZIP2 AND BZIP2_FOUND)
SET(BZIP2_ENABLED ON)
ELSE(WITH_BZIP2 AND BZIP2_FOUND)
SET(BZIP2_ENABLED OFF)
ENDIF(WITH_BZIP2 AND BZIP2_FOUND)
IF(WITH_BZIP2 AND NOT BZIP2_ENABLED)
MESSAGE("WITH_BZIP2 on, but could not find bzip2 includes/libraries.")
MESSAGE(" bzip2 compression support and nettrace2ds will be skipped.")
ENDIF(WITH_BZIP2 AND NOT BZIP2_ENABLED)
SET(BUNZIP2_PROGRAM_MISSING_EXTRA
" will not be able to run the pssimple regression test")
LINTEL_WITH_PROGRAM(BUNZIP2_PROGRAM bunzip2)
#### Snappy
INCLUDE(FindSnappy)
OPTION(WITH_SNAPPY "Build with Snappy support?" ON)
IF(WITH_SNAPPY AND SNAPPY_FOUND)
SET(SNAPPY_ENABLED ON)
ELSE(WITH_SNAPPY AND SNAPPY_FOUND)
SET(SNAPPY_ENABLED OFF)
ENDIF(WITH_SNAPPY AND SNAPPY_FOUND)
IF(WITH_SNAPPY AND NOT SNAPPY_ENABLED)
MESSAGE("WITH_SNAPPY on, but could not find Snappy includes/libraries.")
MESSAGE(" Snappy compression support will be skipped.")
ENDIF(WITH_SNAPPY AND NOT SNAPPY_ENABLED)
#### LZ4
INCLUDE(FindLZ4)
OPTION(WITH_LZ4 "Build with LZ4 support?" ON)
IF(WITH_LZ4 AND LZ4_FOUND)
SET(LZ4_ENABLED ON)
ELSE(WITH_LZ4 AND LZ4_FOUND)
SET(LZ4_ENABLED OFF)
ENDIF(WITH_LZ4 AND LZ4_FOUND)
IF(WITH_LZ4 AND NOT LZ4_ENABLED)
MESSAGE("WITH_LZ4 on, but could not find lz4 includes/libraries.")
MESSAGE(" LZ4 compression support will be skipped.")
ENDIF(WITH_LZ4 AND NOT LZ4_ENABLED)
#### SRT
SET(SRT_MISSING_EXTRA " will skip building srt2ds, cmpsrtds")
LINTEL_WITH_LIBRARY(SRT SRT/SRTTrace.H SRTlite)
IF(SRT_ENABLED) # hack
SET(FULL_SRT_INCLUDE_DIR "${SRT_INCLUDE_DIR}/SRT")
ENDIF(SRT_ENABLED)
#### Extra libraries/programs
SET(LZO_MISSING_EXTRA " lzo compression support will be skipped.")
INCLUDE(FindLZO)
SET(CRYPTO_MISSING_EXTRA " will skip building iphost2ds, nettrace2ds, nfsdsanalysis")
INCLUDE(FindCrypto)
SET(PCRE_MISSING_EXTRA " will skip building bacct2ds")
LINTEL_WITH_LIBRARY(PCRE pcre.h pcre)
SET(PCAP_MISSING_EXTRA " will skip building nettrace2ds, network-driverdump")
LINTEL_WITH_HEADER(PCAP pcap.h)
SET(LINUX_IF_PACKET_MISSING_EXTRA " will skip building lindump-mmap")
LINTEL_WITH_HEADER(LINUX_IF_PACKET linux/if_packet.h)
SET(BOOST_FOREACH_MISSING_EXTRA " will skip building SortedIndex and SortedIndexModule")
LINTEL_BOOST_EXTRA(BOOST_FOREACH boost/foreach.hpp None)
LINTEL_WITH_LIBRARY(AVRO avro.h avro)
LINTEL_WITH_PROGRAM(GNUPLOT gnuplot)
#### Perl
LINTEL_WITH_PERL_MODULE(PERL_XML_PARSER XML::Parser)
LINTEL_WITH_PERL_MODULE(PERL_DATE_PARSE Date::Parse)
LINTEL_WITH_PERL_MODULE(PERL_CRYPT_RIJNDAEL Crypt::Rijndael)
LINTEL_WITH_PERL_MODULE(PERL_FILESYS_STATVFS Filesys::Statvfs)
#### Doxygen
INCLUDE(LintelDocs)
LINTEL_DOCS_CONFIG("DataSeries")
LINTEL_POD2MAN_SETUP()
# TODO: consider redoing lintel in the same way as this, it's way more convenient.
# then this could just be LINTEL_POD2MAN_RELEASE since it's likely constant for
# any individual cmake package.
SET(DATASERIES_POD2MAN_RELEASE "DataSeries ${DATASERIES_VERSION}")
#### Misc Options
OPTION(BUILD_PAPER "Build the src/paper programs" OFF)
OPTION(BUILD_EXAMPLE "Build the example program" OFF)
#### Data Series Server
INCLUDE(FindThrift)
LINTEL_TRY_RUN(GXX_LOSERTREE cmake-include-losertree.cpp)
IF(THRIFT_ENABLED AND GXX_LOSERTREE)
SET(DATA_SERIES_SERVER_ENABLED ON)
ELSE(THRIFT_ENABLED AND GXX_LOSERTREE)
MESSAGE("Missing either thrift or parallel/losertree.h, will skip data-series-server")
ENDIF(THRIFT_ENABLED AND GXX_LOSERTREE)
#### RPath
LINTEL_RPATH_CONFIG()
#### latex Documentation
LINTEL_LATEX_CONFIG()
IF(WITH_LINTEL_LATEX_REBUILD AND NOT LINTEL_LATEX_REBUILD_ENABLED)
MESSAGE("WITH_LINTEL_LATEX_REBUILD enabled, but lintel-latex-rebuild not found")
MESSAGE(" latex-documentation will remain un-built")
ENDIF(WITH_LINTEL_LATEX_REBUILD AND NOT LINTEL_LATEX_REBUILD_ENABLED)
LINTEL_LATEX_REQUIRES(BUILD_TECH_REPORT "DataSeries Tech Report" fullpage.sty epsf.sty)
LINTEL_LATEX_REQUIRES(BUILD_OSR_2008 "DataSeries OSR 2008 paper" ptmb8t.tfm ptmb8t.vf)
LINTEL_LATEX_REQUIRES(BUILD_FAST_2009 "FAST 2009 NFS Analysis paper" fullpage.sty)
#### Dependent calculations
IF (0)
ELSEIF(PERL_CRYPT_RIJNDAEL_ENABLED AND PERL_DATE_PARSE_ENABLED AND GNUPLOT_ENABLED)
SET(LSFDSPLOTS_ENABLED ON)
ELSE(0)
SET(LSFDSPLOTS_ENABLED OFF)
MESSAGE("lsfdsplots will NOT be built PERL_CRYPT_RIJNDAEL_ENABLED=${PERL_CRYPT_RIJNDAEL_ENABLED}, PERL_DATE_PARSE_ENABLED=${PERL_DATE_PARSE_ENABLED}, GNUPLOT_ENABLED=${GNUPLOT_ENABLED}")
ENDIF(0)