Added additional Clang test on Linux when compiler is GCC

pull/65/head
Jeffrey Walton 2015-12-25 02:02:40 -05:00
parent 26c9cec572
commit 4cf8d660d2
1 changed files with 33 additions and 0 deletions

View File

@ -898,6 +898,32 @@ fi
############################################ ############################################
############################################ ############################################
# If using GCC (likely Linux), then perform a quick check with Clang.
# This check was added after testing on Ubuntu 14.04 with Clang 3.4.
if [ "$CXX" == "g++" ]; then
$(which clang++ | head -1) -x c++ -c adhoc.cpp.proto -o $TMP/adhoc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
############################################
# Basic Clang build
echo
echo "************************************" | tee -a "$TEST_RESULTS"
echo "Testing: Clang" | tee -a "$TEST_RESULTS"
echo
unset CXX
unset CXXFLAGS
export CXX="clang++"
"$MAKE" clean > /dev/null 2>&1
"$MAKE" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
fi
fi
############################################
############################################
TEST_END=$(date) TEST_END=$(date)
echo "************************************************" | tee -a "$TEST_RESULTS" echo "************************************************" | tee -a "$TEST_RESULTS"
@ -932,3 +958,10 @@ echo | tee -a "$TEST_RESULTS"
echo "************************************************" | tee -a "$TEST_RESULTS" echo "************************************************" | tee -a "$TEST_RESULTS"
echo "************************************************" | tee -a "$TEST_RESULTS" echo "************************************************" | tee -a "$TEST_RESULTS"
# http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
if [ "$COUNT" -eq "0" ]; then
exit 0
else
exit 1
fi