diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/molden/package.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/molden/package.py b/var/spack/repos/builtin/packages/molden/package.py index 3c8f79d953..ac09a210bc 100644 --- a/var/spack/repos/builtin/packages/molden/package.py +++ b/var/spack/repos/builtin/packages/molden/package.py @@ -52,9 +52,6 @@ class Molden(MakefilePackage): cflags = '-O2 -funroll-loops' fflags = cflags - if '%gcc@10:' in self.spec: - fflags += '-fallow-argument-mismatch' - makefile.filter(r'CFLAGS = (.*)', r'CFLAGS = {0} \1'.format(cflags)) makefile.filter(r'FFLAGS = (.*)', r'FFLAGS = {0} \1'.format(fflags)) @@ -62,5 +59,13 @@ class Molden(MakefilePackage): makefile.filter(r'AFLAG=*', r'AFLAG=') makefile.filter(r'rm -f src/', r'rm -f ') + def flag_handler(self, name, flags): + if name == 'fflags': + if self.spec.satisfies('%gcc@10:'): + if flags is None: + flags = [] + flags.append('-fallow-argument-mismatch') + return (flags, None, None) + def install(self, spec, prefix): install_tree('bin', prefix.bin) |