Skip to content

Alternative refactoring and fix for LLVM easyblock #3818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
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