forked from arkdb/inception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inception_build.sh
executable file
·46 lines (39 loc) · 982 Bytes
/
inception_build.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
#!/bin/bash
debug_dir=$1
platform=$2
if [ $# -eq 1 ]
then
echo "building project in $1"
platform="x"
elif [ $# -ne 2 ]
then
echo "Usage: $0 builddir [platform(linux:Xcode)]"
echo "EXAPMLE: $0 debug [Xcode]"
exit
fi
Gplatform=""
makerule=""
if [ $platform == "Xcode" ]
then
Gplatform="-G Xcode"
else
makerule="make install"
fi
if [ -d $debug_dir ]
then
cd $debug_dir
else
mkdir $debug_dir
cd $debug_dir
# cmake && make && make install
cmake -DWITH_DEBUG=OFF -DCMAKE_INSTALL_PREFIX=./mysql -DMYSQL_DATADIR=./mysql/data \
-DWITH_SSL=bundled -DCMAKE_BUILD_TYPE=RELEASE -DWITH_ZLIB=bundled\
-DMY_MAINTAINER_CXX_WARNINGS="-Wall -Wextra -Wunused -Wno-dev -Wwrite-strings -Wno-strict-aliasing -Wno-unused-parameter -Woverloaded-virtual" \
-DMY_MAINTAINER_C_WARNINGS="-Wall -Wextra -Wno-dev -Wunused -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement" \
$Gplatform\
..
fi
if [ $platform != "Xcode" ]
then
$makerule
fi