forked from boysetsfrog/vimpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctest.sh
executable file
·89 lines (74 loc) · 1.99 KB
/
ctest.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
# Debian compilers
GCC46=/usr/bin/g++-4.6
GCC46_LIB=/usr/lib/gcc/i486-linux-gnu/4.6/
GCC47=/usr/bin/g++-4.7
GCC47_LIB=/usr/lib/gcc/i486-linux-gnu/4.7/
# Colours
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
col=$(($(tput cols) - 8))
compile_test ()
{
FLAGS=$@
echo "Running configure $FLAGS... "
RESULT=`eval ./configure $FLAGS 2>&1`
if [ $? -eq 0 ]
then
printf '%*s%s%s' $col "[ $GREEN" "OK" "$NORMAL ]"
echo ""
echo "Running make... "
make clean >/dev/null 2>&1
RESULT=`make -j4 2>&1`
if [ $? -eq 0 ]
then
printf '%*s%s%s' $col "[ $GREEN" "OK" "$NORMAL ]"
echo ""
else
printf '%*s%s%s' $col "[ $RED" "FAIL" "$NORMAL ]"
echo ""
echo "DUMPING OUTPUT"
echo "===================="
echo "$RESULT"
echo "===================="
fi
else
printf '%*s%s%s' $col "[ $RED" "FAIL" "$NORMAL ]"
echo ""
echo "DUMPING OUTPUT"
echo "===================="
echo "$RESULT"
echo "===================="
fi
}
compile_sets ()
{
compile_test
compile_test --enable-debug=yes --enable-test=yes
compile_test --enable-boost=yes
compile_test --enable-taglib=no
}
echo "Default compiler..."
echo "------------------------------"
compile_sets
echo "Default g++ as compiler..."
echo "------------------------------"
export CXX=g++
compile_sets
echo "g++ 4.6 as compiler..."
echo "------------------------------"
export CXX=$GCC46 LDFLAGS="-L$GCC46_LIB"
compile_sets
echo "g++ 4.7 as compiler..."
echo "------------------------------"
export CXX=$GCC47 LDFLAGS="-L$GCC47_LIB"
compile_sets
echo "clang++ as compiler..."
echo "------------------------------"
export CC=clang CXX=clang++
compile_sets
echo "clang++ with libc++ as compiler..."
echo "------------------------------"
export CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++" LDFLAGS="-lc++abi"
compile_sets