-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·36 lines (30 loc) · 814 Bytes
/
build.sh
File metadata and controls
executable file
·36 lines (30 loc) · 814 Bytes
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
#!/bin/bash
# Detect platform
OS_KERNEL="$(uname -s)"
function clean()
{
rm -rf CMakeFiles CMakeCache.txt
}
clean
TOP_DIR=$(cd "$(dirname "$0")";pwd)
DEP_DIR=${TOP_DIR}/deps/3rd/usr/local/oceanbase/deps/devel
cd ${TOP_DIR}/deps/3rd/
bash dep_create.sh
cd ${TOP_DIR}
cmake . \
-DCMAKE_INSTALL_PREFIX=/u01/obclient \
-DWITH_SSL=OPENSSL \
-DOPENSSL_INCLUDE_DIR=$DEP_DIR/include \
-DOPENSSL_SSL_LIBRARY=$DEP_DIR/lib/libssl.a \
-DOPENSSL_CRYPTO_LIBRARY=$DEP_DIR/lib/libcrypto.a \
-DENABLED_LOCAL_INFILE=1 \
-DDEFAULT_CHARSET=utf8
#-DCMAKE_BUILD_TYPE=DEBUG \
#-DCMAKE_C_FLAGS_DEBUG="-g -O0" \
#-DCMAKE_CXX_FLAGS_DEBUG="-g -O0" \
# Parallel build: detect CPU count per platform
if [[ "$OS_KERNEL" == "Darwin" ]]; then
make -j $(sysctl -n hw.ncpu)
else
make -j $(cat /proc/cpuinfo | grep processor | wc -l)
fi