Fix ZFP cuda build. (#23941)
This commit is contained in:
parent
850cac5ea3
commit
429b71bf57
1 changed files with 9 additions and 1 deletions
|
@ -93,13 +93,21 @@ def cmake_args(self):
|
|||
self.define_from_variant('BUILD_CFP', 'c'),
|
||||
self.define_from_variant('BUILD_ZFPY', 'python'),
|
||||
self.define_from_variant('BUILD_ZFORP', 'fortran'),
|
||||
self.define_from_variant('ZFP_WITH_CUDA', 'cuda'),
|
||||
self.define('ZFP_BIT_STREAM_WORD_SIZE',
|
||||
spec.variants['bsws'].value),
|
||||
self.define_from_variant('ZFP_WITH_BIT_STREAM_STRIDED', 'strided'),
|
||||
self.define_from_variant('ZFP_WITH_ALIGNED_ALLOC', 'aligned'),
|
||||
self.define_from_variant('ZFP_WITH_CACHE_TWOWAY', 'twoway'),
|
||||
self.define_from_variant('ZFP_WITH_CACHE_FAST_HASH', 'fasthash'),
|
||||
self.define_from_variant('ZFP_WITH_CACHE_PROFILE', 'profile')
|
||||
self.define_from_variant('ZFP_WITH_CACHE_PROFILE', 'profile'),
|
||||
]
|
||||
|
||||
if '+cuda' in spec:
|
||||
args.append('-DCUDA_BIN_DIR={0}'.format(spec['cuda'].prefix.bin))
|
||||
|
||||
if not spec.satisfies('cuda_arch=none'):
|
||||
cuda_arch = spec.variants['cuda_arch'].value
|
||||
args.append('-DCMAKE_CUDA_FLAGS=-arch sm_{0}'.format(cuda_arch[0]))
|
||||
|
||||
return args
|
||||
|
|
Loading…
Reference in a new issue