Skip to content

Commit

Permalink
Fixed flags bug in icon-ham package
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikael Stellio committed Sep 3, 2024
1 parent 4ab521a commit dd05776
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion repos/c2sm/packages/icon-ham/package.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from spack import *
from spack.pkg.c2sm.icon import Icon as C2SMIcon
from collections import defaultdict


class IconHam(C2SMIcon):
Expand Down Expand Up @@ -27,6 +28,8 @@ def generate_hammoz_nml(self):
def configure_args(self):
args = super().configure_args()

flags = defaultdict(list)

claw = self.spec.variants['claw'].value
if claw == 'none':
args.append('--disable-claw')
Expand All @@ -44,6 +47,10 @@ def configure_args(self):
args.append('--enable-atm-phy-echam-submodels')
args.append('--enable-hammoz')

args.extend([
'{0}={1}'.format(var, ' '.join(val)) for var, val in flags.items()
])

return args

def build(self, spec, prefix):
Expand All @@ -57,4 +64,4 @@ def build(self, spec, prefix):
make.jobs = 8
make('preprocess')
make.jobs = make_jobs
make(*self.build_targets)
make(*self.build_targets)

0 comments on commit dd05776

Please sign in to comment.