From b942a4d8a3e27317cac50ce37ff5302d477664d8 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 8 Jun 2020 15:52:13 -0500 Subject: Clean up code to get clang version in config/linux-gnulibc1 --- config/linux-gnulibc1 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 055b075..a6f81ff 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -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" ;; -- cgit v0.12