forked from msoos/cryptominisat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis-cmake.sh
executable file
·105 lines (89 loc) · 2.89 KB
/
.travis-cmake.sh
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
#!/bin/bash -x
# This file wraps CMake invocation for TravisCI
# so we can set different configurations via environment variables.
#
# We could modify our CMake scripts to read environment variables directly but
# that would create two ways of setting the same thing which doesn't seem like
# a good idea.
# export CC="gcc-4.7"
# export CXX="g++-4.7"
SOURCE_DIR="$1"
COMMON_CMAKE_ARGS="-G \"Unix Makefiles\" -DENABLE_TESTING:BOOL=ON"
# Note eval is needed so COMMON_CMAKE_ARGS is expanded properly
case $CMS_CONFIG in
NORMAL)
sudo apt-get install libboost-program-options-dev
eval cmake ${COMMON_CMAKE_ARGS} \
${SOURCE_DIR}
;;
STATIC_BIN)
sudo apt-get install libboost-program-options-dev
eval cmake ${COMMON_CMAKE_ARGS} \
-DSTATICCOMPILE:BOOL=ON \
${SOURCE_DIR}
;;
ONLY_SIMPLE)
eval cmake ${COMMON_CMAKE_ARGS} \
-DONLY_SIMPLE:BOOL=ON \
${SOURCE_DIR}
;;
ONLY_SIMPLE_STATIC)
eval cmake ${COMMON_CMAKE_ARGS} \
-DONLY_SIMPLE:BOOL=ON \
-DSTATICCOMPILE:BOOL=ON \
${SOURCE_DIR}
;;
MORE_DEBUG)
sudo apt-get install libboost-program-options-dev
eval cmake ${COMMON_CMAKE_ARGS} \
-DMORE_DEBUG:BOOL=ON \
${SOURCE_DIR}
;;
STATS)
sudo apt-get install libboost-program-options-dev
eval cmake ${COMMON_CMAKE_ARGS} \
-DSTATS:BOOL=ON \
${SOURCE_DIR}
;;
NOZLIB)
sudo apt-get install libboost-program-options-dev
eval cmake ${COMMON_CMAKE_ARGS} \
-DNOZLIB:BOOL=ON \
${SOURCE_DIR}
;;
RELEASE)
sudo apt-get install libboost-program-options-dev
eval cmake ${COMMON_CMAKE_ARGS} \
-DCMAKE_BUILD_TYPE:STRING=Release \
${SOURCE_DIR}
;;
NOSQLITE)
sudo apt-get install libboost-program-options-dev
sudo apt-get remove libsqlite3-dev
eval cmake ${COMMON_CMAKE_ARGS} \
${SOURCE_DIR}
;;
NOMYSQL)
sudo apt-get install libboost-program-options-dev
sudo apt-get remove libmysqlclient-dev
eval cmake ${COMMON_CMAKE_ARGS} \
${SOURCE_DIR}
;;
NOMYSQLNOSQLITE)
sudo apt-get install libboost-program-options-dev
sudo apt-get remove libmysqlclient-dev
sudo apt-get remove libsqlite3-dev
eval cmake ${COMMON_CMAKE_ARGS} \
${SOURCE_DIR}
;;
NOPYTHON)
sudo apt-get install libboost-program-options-dev
sudo apt-get remove python2.7-dev python-dev
eval cmake ${COMMON_CMAKE_ARGS} \
${SOURCE_DIR}
;;
*)
echo "\"${STP_CONFIG}\" configuration not recognised"
exit 1
esac
exit $?