Respect user's CC

This commit is contained in:
Dag-Erling Smørgrav 2016-09-04 16:18:13 +02:00
parent d9fbbe245f
commit a6eb5d4f68
1 changed files with 4 additions and 3 deletions

View File

@ -5,20 +5,21 @@ has() {
}
# BullseyeCoverage needs to know exactly which compiler we're using
if has clang clang++ ; then
if has "${CC}" "${CXX}" ; then
echo "using CC=${CC}"
elif has clang clang++ ; then
echo "using Clang"
export CC="${CC:-clang}"
export CPP="${CPP:-${CC} -E}"
export CXX="${CXX:-clang++}"
elif has gcc g++ ; then
echo "using GCC"
export CC="${CC:-gcc}"
export CPP="${CPP:-gcc -E}"
export CXX="${CXX:-g++}"
else
echo "WARNING: using default compiler," \
"coverage analysis may not work"
fi
export CPP="${CPP:-${CC} -E}"
set -e