From: Evgeny Vereshchagin Date: Tue, 28 Jul 2020 05:26:53 +0000 (+0000) Subject: travis: set CXX correctly X-Git-Tag: v2.37-rc1~527^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6056e05b283c62c725ef1b644d1eedc365c8e7e7;p=thirdparty%2Futil-linux.git travis: set CXX correctly Signed-off-by: Evgeny Vereshchagin --- diff --git a/.travis-functions.sh b/.travis-functions.sh index 563785b646..13a4ed4709 100755 --- a/.travis-functions.sh +++ b/.travis-functions.sh @@ -40,10 +40,27 @@ shell_session_update() { :; } function xconfigure { + local gcc_version clang_version cxx + which "$CC" "$CC" --version - ./configure "$@" $OSX_CONFOPTS + if [[ "$CC" =~ ^clang-([0-9]+)$ ]]; then + clang_version=${BASH_REMATCH[1]} + cxx=clang++-${clang_version} + elif [[ "$CC" =~ ^gcc-([0-9]+)$ ]]; then + gcc_version=${BASH_REMATCH[1]} + cxx=g++-${gcc_version} + elif [[ "$CC" == "clang" ]]; then + cxx=clang++ + elif [[ "$CC" == "gcc" ]]; then + cxx=g++ + fi + + which "$cxx" + "$cxx" --version + + CC=$CC CXX=$cxx ./configure "$@" $OSX_CONFOPTS err=$? if [ "$DUMP_CONFIG_LOG" = "short" ]; then grep -B1 -A10000 "^## Output variables" config.log | grep -v "_FALSE="