Clean up code to get clang version in config/linux-gnulibc1

This commit is contained in:
Larry Knox 2020-06-08 15:52:13 -05:00
parent 23d887dc22
commit b942a4d8a3

View File

@ -235,14 +235,8 @@ case $CC in
;;
*clang*)
# clang -v will return version number following "clang" on Linux machines,
# but on Macs the version number will follow "Apple LLVM version"
cc_version_info="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\
cc_version_info="`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\
grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
else
cc_version_info="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\
grep 'Apple LLVM version' | sed 's/.*Apple LLVM version \([-a-z0-9\.]*\).*/\1/'`"
fi
;;
*)
@ -339,6 +333,11 @@ case $CXX in
cxx_version_info=`echo $cxx_version_info`
;;
*clang++*)
cxx_version_info="`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
;;
*)
echo "No match to get cxx_version_info for $CXX"
;;