diff --git a/easybuild/easyblocks/generic/cmakemake.py b/easybuild/easyblocks/generic/cmakemake.py index 296e6f26fe..3f8e591cd1 100644 --- a/easybuild/easyblocks/generic/cmakemake.py +++ b/easybuild/easyblocks/generic/cmakemake.py @@ -332,7 +332,7 @@ def configure_step(self, srcdir=None, builddir=None): cuda_root = get_software_root('CUDA') if cuda_root: options['CMAKE_CUDA_HOST_COMPILER'] = which(os.getenv('CXX', 'g++')) - options['CMAKE_CUDA_COMPILER'] = 'nvcc' + 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])