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:
parent
2970c02639
commit
3cfc1dbc14
1 changed files with 3 additions and 1 deletions
|
@ -49,7 +49,6 @@ class Pfunit(CMakePackage):
|
||||||
# See https://github.com/Goddard-Fortran-Ecosystem/pFUnit/pull/179
|
# See https://github.com/Goddard-Fortran-Ecosystem/pFUnit/pull/179
|
||||||
conflicts("+shared", when="@4.0.0:")
|
conflicts("+shared", when="@4.0.0:")
|
||||||
conflicts("+use_comm_world", when="~mpi")
|
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")
|
patch("mpi-test.patch", when="@:3.99.99 +use_comm_world")
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
|
@ -78,6 +77,9 @@ def cmake_args(self):
|
||||||
self.define_from_variant('OPENMP', 'openmp'),
|
self.define_from_variant('OPENMP', 'openmp'),
|
||||||
'-DMAX_RANK=%s' % spec.variants['max_array_rank'].value]
|
'-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:'):
|
if spec.satisfies('@4.0.0:'):
|
||||||
args.append('-DSKIP_MPI=%s' % ('YES' if '~mpi' in spec else 'NO'))
|
args.append('-DSKIP_MPI=%s' % ('YES' if '~mpi' in spec else 'NO'))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue