qmcpack pass cuda_arch correctly to cmake (#31407)

Fix compilation of @3.14.0+cuda  (didn't check older versions).
This commit is contained in:
Simon Pintarelli 2022-07-01 21:39:50 +02:00 committed by GitHub
parent 87b8321fa9
commit bc215c7504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,7 +303,10 @@ def cmake_args(self):
'QMCPACK only supports compilation for a single '
'GPU architecture at a time'
)
args.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch))
if '@3.14.0:' in self.spec:
args.append('-DCMAKE_CUDA_ARCHITECTURES={0}'.format(cuda_arch))
else:
args.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch))
else:
args.append('-DQMC_CUDA=0')