-
Notifications
You must be signed in to change notification settings - Fork 1
/
autogen.sh
executable file
·34 lines (27 loc) · 937 Bytes
/
autogen.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
#!/bin/bash
if [ $# == 0 ]; then
echo "Enter option either release or debug."
echo "End."
fi
if [ "$1" == "release" ]; then
echo "[task] Compile project in RELEASE mode".
echo "[ cmd] mkdir build/release"
mkdir -p build/release
cd build/release
echo "[ cmd] cmake -DLibtorch_REL_PATH=../libtorch/ -DCMAKE_BUILD_TYPE=Release ../../"
cmake -DLibtorch_REL_PATH=../libtorch/ -DCMAKE_BUILD_TYPE=Release ../../
echo "[ cmd] make -j12"
make -j12
echo "[task] Compile project done."
fi
if [ "$1" == "debug" ]; then
echo "[task] Compile project in DEBUG mode".
echo "[ cmd] mkdir build/debug"
mkdir -p build/debug
cd build/debug
echo "[ cmd] cmake -DLibtorch_REL_PATH=../libtorch/ -DCMAKE_BUILD_TYPE=Debug ../../"
cmake -DLibtorch_REL_PATH=../libtorch/ -DCMAKE_BUILD_TYPE=Debug ../..
echo "[ cmd] make -j12"
make -j12
echo "[task] Compile project done."
fi