-
Notifications
You must be signed in to change notification settings - Fork 212
/
make.sh
29 lines (27 loc) · 952 Bytes
/
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
#!/bin/bash
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