-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy pathmake.sh
36 lines (34 loc) · 1.03 KB
/
make.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
#!/bin/bash
if [ ! -d lib ]; then
mkdir lib
fi
cd depends/log4z
bash make.sh $*
cp lib/*.a ../../lib/
cd ../../
if [ ! -d build_linux ]; then
mkdir build_linux
fi
cd build_linux
if [ $# -gt 0 ] && [ $1 = "max" ]; then
echo "has search max version"
if [ -f /usr/bin/g++-8 ]; then
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/bin/g++-8 $* ../ -DCMAKE_BUILD_TYPE=Release
make -j2
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/bin/g++-8 $* ../ -DCMAKE_BUILD_TYPE=Debug
make -j2
elif [ -f /usr/bin/g++-6 ]; then
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-6 -DCMAKE_CXX_COMPILER=/usr/bin/g++-6 $* ../ -DCMAKE_BUILD_TYPE=Release
make -j2
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-6 -DCMAKE_CXX_COMPILER=/usr/bin/g++-6 $* ../ -DCMAKE_BUILD_TYPE=Debug
make -j2
else
cmake $* ../
make -j2
fi
else
cmake $* ../ -DCMAKE_BUILD_TYPE=Release
make -j2
cmake $* ../ -DCMAKE_BUILD_TYPE=Debug
make -j2
fi