mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
Clean up code to get clang version in config/linux-gnulibc1
This commit is contained in:
parent
23d887dc22
commit
b942a4d8a3
@ -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"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user