summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-11-04 10:52:38 +0100
committerGitHub <noreply@github.com>2021-11-04 03:52:38 -0600
commit1dcabdbc8d7aa71348a262e659a528242b1cd25e (patch)
tree5f63934625eb0d5d008e7a03874a1de8aad1eac2
parent503576c0178977dceebc29bef43d4d86a22c236d (diff)
downloadspack-1dcabdbc8d7aa71348a262e659a528242b1cd25e.tar.gz
spack-1dcabdbc8d7aa71348a262e659a528242b1cd25e.tar.bz2
spack-1dcabdbc8d7aa71348a262e659a528242b1cd25e.tar.xz
spack-1dcabdbc8d7aa71348a262e659a528242b1cd25e.zip
mfem, hpx: fix recipes after conditional variants (#27215)
-rw-r--r--var/spack/repos/builtin/packages/hpx/package.py9
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py2
2 files changed, 7 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py
index 2afb592172..1ee5fdf9bb 100644
--- a/var/spack/repos/builtin/packages/hpx/package.py
+++ b/var/spack/repos/builtin/packages/hpx/package.py
@@ -163,13 +163,16 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
patch('git_external.patch', when='@1.3.0 instrumentation=apex')
def instrumentation_args(self):
- for value in self.variants['instrumentation'].values:
+ args = []
+ for value in self.variants['instrumentation'][0].values:
if value == 'none':
continue
condition = 'instrumentation={0}'.format(value)
- yield self.define(
- 'HPX_WITH_{0}'.format(value.upper()), condition in self.spec)
+ args.append(self.define(
+ 'HPX_WITH_{0}'.format(value.upper()), condition in self.spec
+ ))
+ return args
def cmake_args(self):
spec, args = self.spec, []
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index fff1564140..616db65488 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -343,7 +343,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
if '+cuda' in spec:
xcompiler = '-Xcompiler='
xlinker = '-Xlinker='
- cuda_arch = spec.variants['cuda_arch'].value
+ cuda_arch = None if '~cuda' in spec else spec.variants['cuda_arch'].value
# We need to add rpaths explicitly to allow proper export of link flags
# from within MFEM.