Skip to content

Commit 12a20ef

Browse files
committed
s
1 parent abb58df commit 12a20ef

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

selfcheck.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ if [ "$cxx_type" = "g++" ]; then
5656
elif [ "$cxx_type" = "clang" ]; then
5757
clang_ver=$($CXX -dumpversion)
5858
clang_ver=${clang_ver%%.*}
59-
find /usr/include -name cctype
6059
defs=
6160
defs="$defs -D__BYTE_ORDER__"
6261
defs="$defs -D__linux__"
@@ -72,7 +71,8 @@ elif [ "$cxx_type" = "clang" ]; then
7271
inc=
7372
if [ -d "/usr/include/c++/v1" ]; then
7473
inc="$inc -I/usr/include/c++/v1"
75-
elif [ -d "/usr/include/c++/$clang_ver" ]; then
74+
fi
75+
if [ -d "/usr/include/c++/$clang_ver" ]; then
7676
inc="$inc -I/usr/include/c++/$clang_ver"
7777
fi
7878
inc="$inc -I/usr/include"
@@ -86,12 +86,18 @@ elif [ "$cxx_type" = "clang" ]; then
8686
exit $ec
8787
fi
8888
elif [ "$cxx_type" = "Apple" ]; then
89-
find /Applications -name endian.h
9089
xcode_path="/Applications/Xcode_16.4.app"
9190
if [ ! -d "$xcode_path" ]; then
9291
xcode_path="/Applications/Xcode_15.2.app"
9392
fi
94-
./simplecpp simplecpp.cpp -e -f -std=gnu++11 -D__BYTE_ORDER__ -D__APPLE__ -I"$xcode_path/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" -I"$xcode_path/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1"
93+
find $xcode_path -name endian.h
94+
defs=
95+
defs="$defs -D__BYTE_ORDER__"
96+
defs="$defs -D__APPLE__"
97+
inc=
98+
inc="$inc -I$xcode_path/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
99+
inc="$inc -I$xcode_path/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1"
100+
./simplecpp simplecpp.cpp -e -f -std=gnu++11 $defs $inc
95101
ec=$?
96102
if [ $ec -ne 0 ]; then
97103
exit $ec

0 commit comments

Comments
 (0)