pfunit: fix gcc10 +mpi (#23878)

Instead of refusing to build +mpi with gcc10, add what I guess is now
the standard workaround, ie., `-fallow-argument-mismatch`.

Getting this into pfunit's cmake-based but kinda non-standard build  isi
a bit ugly, but you gotta do what you gotta do...
This commit is contained in:
Kai Germaschewski 2021-06-28 05:33:23 -04:00 committed by GitHub
parent 2970c02639
commit 3cfc1dbc14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,6 @@ class Pfunit(CMakePackage):
# See https://github.com/Goddard-Fortran-Ecosystem/pFUnit/pull/179
conflicts("+shared", when="@4.0.0:")
conflicts("+use_comm_world", when="~mpi")
conflicts('+mpi', when='@:3.99.99 %gcc@10.0.0:')
patch("mpi-test.patch", when="@:3.99.99 +use_comm_world")
def patch(self):
@ -78,6 +77,9 @@ def cmake_args(self):
self.define_from_variant('OPENMP', 'openmp'),
'-DMAX_RANK=%s' % spec.variants['max_array_rank'].value]
if self.spec.satisfies('%gcc@10:'):
args.append('-DCMAKE_Fortran_FLAGS_DEBUG=-g -O2 -fallow-argument-mismatch')
if spec.satisfies('@4.0.0:'):
args.append('-DSKIP_MPI=%s' % ('YES' if '~mpi' in spec else 'NO'))
else: