From ee216590a83315ab7e6deaddcdb1030502a3e9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Sat, 30 Nov 2024 13:43:01 +0100 Subject: [PATCH] pass the preferred host compiler to the CUDA compiler --- easybuild/easyblocks/generic/cmakemake.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easybuild/easyblocks/generic/cmakemake.py b/easybuild/easyblocks/generic/cmakemake.py index 797a504fb2..b5bd33f250 100644 --- a/easybuild/easyblocks/generic/cmakemake.py +++ b/easybuild/easyblocks/generic/cmakemake.py @@ -328,6 +328,11 @@ def configure_step(self, srcdir=None, builddir=None): # ensure CMake uses EB python, not system or virtualenv python options.update(get_cmake_python_config_dict()) + # pass the preferred host compiler to the CUDA compiler + cuda_root = get_software_root('CUDA') + if cuda_root: + self.cfg.update('preconfigopts', 'CUDAHOSTCXX=%s' % which(os.getenv('CXX', 'g++'))) + if not self.cfg.get('allow_system_boost', False): boost_root = get_software_root('Boost') if boost_root: