Recognize clang correctly in macOS Travis CI builds

It is called g++, but is actually always clang, so don't even bother
checking "g++ --version" output.
This commit is contained in:
Vadim Zeitlin 2021-04-06 18:49:29 +02:00
parent 8bc2ff71e2
commit e5011b46ae

View File

@ -89,7 +89,20 @@ case $wxTOOLSET in
echo 'travis_fold:end:configure'
if [ "$wxALLOW_WARNINGS" != 1 ]; then
case "$TRAVIS_COMPILER" in
# Under macOS TRAVIS_COMPILER is set to g++, but it's actually an
# alias for clang.
case "$(uname -s)" in
Darwin)
real_compiler=clang
;;
*)
# Elsewhere either gcc or clang can be used.
real_compiler="$TRAVIS_COMPILER"
;;
esac
case "$real_compiler" in
clang)
allow_warn_opt="-Wno-error=#warnings"
;;
@ -99,7 +112,7 @@ case $wxTOOLSET in
;;
*)
echo "*** Unknown compiler: $TRAVIS_COMPILER ***"
echo "*** Unknown compiler: $real_compiler ***"
;;
esac