Add compiler flag only if available

This commit is contained in:
Matthias Krack 2021-09-30 12:03:52 +02:00
parent 47f9fa0235
commit 0865e79d07

View file

@ -51,7 +51,9 @@ case "$with_mpich" in
# workaround for compilation with GCC >= 10, until properly fixed:
# https://github.com/pmodels/mpich/issues/4300
("${FC}" --version | grep -q 'GNU') && compat_flag="-fallow-argument-mismatch" || compat_flag=""
if ("${FC}" --version | grep -q 'GNU'); then
("${FC}" --help -v 2>&1 | grep -q 'fallow-argument-mismatch') && compat_flag="-fallow-argument-mismatch" || compat_flag=""
fi
./configure \
--prefix="${pkg_install_dir}" \
--libdir="${pkg_install_dir}/lib" \