Skip to content

Commit 7a30d21

Browse files
committed
s
1 parent 433421d commit 7a30d21

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

selfcheck.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ elif [ "$cxx_type" = "clang" ]; then
7676
inc="$inc -I/usr/include/x86_64-linux-gnu"
7777
fi
7878
elif [ "$cxx_type" = "Apple" ]; then
79-
clang_ver=$($CXX -dumpversion)
80-
echo $clang_ver
81-
clang_ver=${clang_ver%%.*}
82-
echo $clang_ver
79+
appleclang_ver=$($CXX -dumpversion)
80+
appleclang_ver=${clang_ver%%.*}
8381
xcode_path="/Applications/Xcode_16.4.app"
8482
if [ ! -d "$xcode_path" ]; then
8583
xcode_path="/Applications/Xcode_15.2.app"
@@ -107,7 +105,9 @@ elif [ "$cxx_type" = "Apple" ]; then
107105
inc="$inc -I$sdk_path/usr/include/c++/v1"
108106
inc="$inc -I$sdk_path/usr/include"
109107
inc="$inc -I$sdk_path/usr/include/i386"
110-
inc="$inc -I$xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/$clang_ver/include/"
108+
if [ -d "$xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" ]; then
109+
inc="$inc -I$xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/$appleclang_ver/include/"
110+
fi
111111
else
112112
echo "unknown compiler '$cxx_type'"
113113
exit 1

0 commit comments

Comments
 (0)