From 1dcabdbc8d7aa71348a262e659a528242b1cd25e Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 4 Nov 2021 10:52:38 +0100 Subject: mfem, hpx: fix recipes after conditional variants (#27215) --- var/spack/repos/builtin/packages/hpx/package.py | 9 ++++++--- var/spack/repos/builtin/packages/mfem/package.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'var') 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. -- cgit v1.2.3-70-g09d2