diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-06-08 20:52:13 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2020-06-08 20:52:13 (GMT) |
commit | b942a4d8a3e27317cac50ce37ff5302d477664d8 (patch) | |
tree | 44f579037f9403578a5687983d6233a91f652f7b | |
parent | 23d887dc22b71a10423a3206a9998ed87a18f482 (diff) | |
download | hdf5-b942a4d8a3e27317cac50ce37ff5302d477664d8.zip hdf5-b942a4d8a3e27317cac50ce37ff5302d477664d8.tar.gz hdf5-b942a4d8a3e27317cac50ce37ff5302d477664d8.tar.bz2 |
Clean up code to get clang version in config/linux-gnulibc1
-rw-r--r-- | config/linux-gnulibc1 | 13 |
1 files 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" ;; |