Skip to content

Commit 1dcabdb

Browse files
authored
mfem, hpx: fix recipes after conditional variants (#27215)
1 parent 503576c commit 1dcabdb

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

var/spack/repos/builtin/packages/hpx/package.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,16 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
163163
patch('git_external.patch', when='@1.3.0 instrumentation=apex')
164164

165165
def instrumentation_args(self):
166-
for value in self.variants['instrumentation'].values:
166+
args = []
167+
for value in self.variants['instrumentation'][0].values:
167168
if value == 'none':
168169
continue
169170

170171
condition = 'instrumentation={0}'.format(value)
171-
yield self.define(
172-
'HPX_WITH_{0}'.format(value.upper()), condition in self.spec)
172+
args.append(self.define(
173+
'HPX_WITH_{0}'.format(value.upper()), condition in self.spec
174+
))
175+
return args
173176

174177
def cmake_args(self):
175178
spec, args = self.spec, []

var/spack/repos/builtin/packages/mfem/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def is_sys_lib_path(dir):
343343
if '+cuda' in spec:
344344
xcompiler = '-Xcompiler='
345345
xlinker = '-Xlinker='
346-
cuda_arch = spec.variants['cuda_arch'].value
346+
cuda_arch = None if '~cuda' in spec else spec.variants['cuda_arch'].value
347347

348348
# We need to add rpaths explicitly to allow proper export of link flags
349349
# from within MFEM.

0 commit comments

Comments
 (0)