Skip to content

Commit 9347a72

Browse files
committed
s
1 parent e342e8b commit 9347a72

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

selfcheck.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ if [ "$cxx_type" = "g++" ]; then
2626
exit $ec
2727
fi
2828
elif [ "$cxx_type" = "clang" ]; then
29-
#clang_ver=$($CXX -dumpversion)
30-
#clang_ver=${clang_ver%%.*}
29+
clang_ver=$($CXX -dumpversion)
30+
clang_ver=${clang_ver%%.*}
3131
find /usr/include -name cctype
32-
./simplecpp simplecpp.cpp -e -f -std=gnu++11 -D__BYTE_ORDER__ -D__linux__ -I"/usr/include/c++/v1"
32+
cxx_inc="/usr/include/c++/v1"
33+
if [ -d "$cxx_inc" ]; then
34+
else
35+
cxx_inc="/usr/lib/llvm-$clang_ver/include/c++/v1"
36+
fi
37+
./simplecpp simplecpp.cpp -e -f -std=gnu++11 -D__BYTE_ORDER__ -D__linux__ -I"$cxx_inc"
3338
ec=$?
3439
if [ $ec -ne 0 ]; then
3540
exit $ec

0 commit comments

Comments
 (0)