Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ def extra_options(extra_vars=None):
})
return extra_vars

@staticmethod
def list_to_cmake_arg(lst):
"""Convert iterable of strings to a value that can be passed as a CLI argument to CMake resulting in a list"""
return "'%s'" % ';'.join(lst)

def __init__(self, *args, **kwargs):
"""Constructor for CMakeMake easyblock"""
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -356,7 +361,7 @@ def configure_step(self, srcdir=None, builddir=None):
options['CMAKE_CUDA_COMPILER'] = which('nvcc')
cuda_cc = build_option('cuda_compute_capabilities') or self.cfg['cuda_compute_capabilities']
if cuda_cc:
options['CMAKE_CUDA_ARCHITECTURES'] = '"%s"' % ';'.join([cc.replace('.', '') for cc in cuda_cc])
options['CMAKE_CUDA_ARCHITECTURES'] = self.list_to_cmake_arg(cc.replace('.', '') for cc in cuda_cc)
else:
raise EasyBuildError('List of CUDA compute capabilities must be specified, either via '
'cuda_compute_capabilities easyconfig parameter or via '
Expand Down
Loading