forked from mongodb/mongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_mongo_pmem.sh
executable file
·33 lines (24 loc) · 979 Bytes
/
build_mongo_pmem.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
#!/bin/bash
MONGO_HOME=/home/vldb/mongo-pmem
IS_DEBUG=0
#IS_DEBUG=1
BUILD_NAME=
#BUILD_FLAGS="-Imongo/db/pmem/ -DUNIV_PMEMOBJ_BUF"
#BUILD_FLAGS="-Ithird_party/wiredtiger/src/pmem/"
#BUILD_FLAGS="-Ithird_party/wiredtiger/src/pmem/ -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_PARTITION"
# Change the build macro in SConstruct file
cd $MONGO_HOME
#echo ${BUILD_FLAGS}
#python2 buildscripts/scons.py mongod --dbg=on --opt=off -j 40 LIBS='pmem pmemobj' CXXFLAGS='-g' --prefix=${MONGO_HOME}
if [ $IS_DEBUG -eq 0 ]; then
python2 buildscripts/scons.py mongod -j 40 LIBS='pmem pmemobj aio' CXXFLAGS='-g' --prefix=${MONGO_HOME}
cp build/opt/mongo/mongod .
cp build/opt/mongo/mongo .
cp build/opt/mongo/mongos .
else
echo "Build the Debug mode"
python2 buildscripts/scons.py mongod --dbg=on --opt=off -j 40 LIBS='pmem pmemobj aio' CXXFLAGS='-g' --prefix=${MONGO_HOME}
cp build/debug/mongo/mongod .
cp build/debug/mongo/mongo .
cp build/debug/mongo/mongos .
fi