Skip to content

Commit 756ecac

Browse files
committed
selfcheck.sh: also run with system includes made available
1 parent 435a74c commit 756ecac

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

selfcheck.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,25 @@ output=$(./simplecpp simplecpp.cpp -e -f 2>&1)
44
ec=$?
55
errors=$(echo "$output" | grep -v 'Header not found: <')
66
if [ $ec -ne 0 ]; then
7-
# only fail if got errors which do not refer to missing system includes
7+
# only fail if we got errors which do not refer to missing system includes
88
if [ ! -z "$errors" ]; then
99
exit $ec
1010
fi
11+
fi
12+
13+
gcc_ver=$(gcc -dumpversion)
14+
./simplecpp simplecpp.cpp -e -f -D__GNUC__ -D__STDC__ -D__STDC_HOSTED__ -D__CHAR_BIT__=8 -I"/usr/include" -I"/usr/include/linux" -I"/usr/include/c++/$gcc_ver" -I"/usr/include/c++/$gcc_ver/x86_64-pc-linux-gnu" -I"/usr/lib64/gcc/x86_64-pc-linux-gnu/$gcc_ver/include"
15+
ec=$?
16+
if [ $ec -ne 0 ]; then
17+
exit $ec
18+
fi
19+
20+
if [ -d "/usr/include/c++/v1" ]; then
21+
#clang_ver=$(clang -dumpversion)
22+
#clang_ver=${clang_ver%%.*}
23+
./simplecpp simplecpp.cpp -e -f -D__BYTE_ORDER__ -I"/usr/include/c++/v1"
24+
ec=$?
25+
if [ $ec -ne 0 ]; then
26+
exit $ec
27+
fi
1128
fi

0 commit comments

Comments
 (0)