Skip to content

Commit

Permalink
Merge pull request #312 from AlexanderRichert-NOAA/madis_argmismatch
Browse files Browse the repository at this point in the history
madis: allow arg mismatch for apple-clang
  • Loading branch information
AlexanderRichert-NOAA authored Aug 28, 2023
2 parents 6291ec9 + f8cb1c1 commit 0fba13b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions var/spack/repos/builtin/packages/madis/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ class Madis(MakefilePackage):

def setup_build_environment(self, env):
fflags = []
if self.spec.satisfies("%gcc@10:"):
fflags.append("-fallow-argument-mismatch")

if self.compiler.name in ["gcc", "clang", "apple-clang"]:
with self.compiler.compiler_environment():
gfortran_major_version = int(
spack.compiler.get_compiler_version_output(
self.compiler.fc, "-dumpversion"
).split(".")[0]
)
if gfortran_major_version >= 10:
fflags.append("-fallow-argument-mismatch")

if self.spec.satisfies("+pic"):
fflags.append("-fPIC")
Expand Down

0 comments on commit 0fba13b

Please sign in to comment.