vecgeom: fix install error when ~cuda (#29716)
This commit is contained in:
parent
0a3d496db1
commit
0168047429
@ -101,12 +101,14 @@ def cmake_args(self):
|
|||||||
|
|
||||||
if spec.satisfies('@:1.1.18'):
|
if spec.satisfies('@:1.1.18'):
|
||||||
args.append(self.define_from_variant('CUDA'))
|
args.append(self.define_from_variant('CUDA'))
|
||||||
|
if '+cuda' in spec:
|
||||||
arch = spec.variants['cuda_arch'].value
|
arch = spec.variants['cuda_arch'].value
|
||||||
if len(arch) != 1 or arch[0] == 'none':
|
if len(arch) != 1 or arch[0] == 'none':
|
||||||
raise InstallError("Exactly one cuda_arch must be specified")
|
raise InstallError("Exactly one cuda_arch must be specified")
|
||||||
args.append(define('CUDA_ARCH', arch[0]))
|
args.append(define('CUDA_ARCH', arch[0]))
|
||||||
else:
|
else:
|
||||||
args.append(self.define_from_variant('VECGEOM_ENABLE_CUDA', 'cuda'))
|
args.append(self.define_from_variant('VECGEOM_ENABLE_CUDA', 'cuda'))
|
||||||
|
if '+cuda' in spec:
|
||||||
# This will add an (ignored) empty string if no values are
|
# This will add an (ignored) empty string if no values are
|
||||||
# selected, otherwise will add a CMake list of arch values
|
# selected, otherwise will add a CMake list of arch values
|
||||||
args.append(self.define(
|
args.append(self.define(
|
||||||
|
Loading…
Reference in New Issue
Block a user