forked from TuGraph-family/tugraph-db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_custom_embed.sh
executable file
·23 lines (20 loc) · 1.11 KB
/
make_custom_embed.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# This file shows you how to build an embedding application using TuGraph. We assume you are
# building the application to debug a plugin. So the PLUGIN_CPP must be provided as the paramemter
# to this script.
#
# LG_INCLUDE must point to the include directory of TuGraph
# LG_LIB must point to the library path of TuGraph
#
# If everything runs smoothly, you will get an executable called `embed` which you can simply
# run or debug.
APP=$1
PROCEDURE_PATH=${2:-algo_cpp}
APP_PATH=algo_cpp
LG_INCLUDE=../include
LG_LIB=../build/output/
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
g++ -fno-gnu-unique -fPIC -g --std=c++17 -I${LG_INCLUDE} -rdynamic -O3 -fopenmp -ldl -DNDEBUG -o $PROCEDURE_PATH/${APP}_procedure $APP_PATH/${APP}_core.cpp $PROCEDURE_PATH/${APP}_procedure.cpp embed_main.cpp "${LG_LIB}/liblgraph.so" -lrt
elif [[ "$OSTYPE" == "darwin"* ]]; then
clang++ -stdlib=libc++ -fPIC -g --std=c++17 -I${LG_INCLUDE} -rdynamic -O3 -Xpreprocessor -fopenmp -ldl -lomp -DNDEBUG -o $PROCEDURE_PATH/${APP}_procedure $APP_PATH/${APP}_core.cpp $PROCEDURE_PATH/${APP}_procedure.cpp embed_main.cxx "${LG_LIB}/liblgraph.so"
fi