From e5011b46ae10ce47375ba134cd4270ce169f1a8f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 6 Apr 2021 18:49:29 +0200 Subject: [PATCH] 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. --- build/tools/travis-ci.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 0186f9fcf1..fb6d3f33a1 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -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