diff options
Diffstat (limited to 'test_optdepends.sh')
-rw-r--r-- | test_optdepends.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test_optdepends.sh b/test_optdepends.sh index c82eec8c5b14..bbb44536ca44 100644 --- a/test_optdepends.sh +++ b/test_optdepends.sh @@ -11,7 +11,15 @@ CONFOPTS="" # Add hypre support if [ -f "/usr/lib/libHYPRE.so" ]; then - CONFOPTS="${CONFOPTS} --with-hypre=1" + VERSION_MIN=2.14.2 + VERSION=$(readlink -f '/usr/lib/libHYPRE.so' | sed 's/^.*\.so\.') + + if [ "$VERSION_MIN" = "$(printf '%s\n' "$VERSION_MIN" "$VERSION" | sort -V | head -n1)" ]; then + CONFOPTS="${CONFOPTS} --with-hypre=1" + else + (>&2 echo "WARNING: COMPILING PETSc WITHOUT HYPRE.") + (>&2 echo "HYPRE $VERSION FOUND BUT AT LEAST $VERSION_MIN IS REQUIRED.") + fi fi # Add mumps support |