diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2020-06-27 13:36:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-27 15:36:18 -0500 |
commit | d7c46d8c57b763798db16908c671bfb13e8aa9f6 (patch) | |
tree | 98292215633cba7fba4d3c36a1b90dc68e20f420 | |
parent | edf776aeb96618267891fb2b55cc17fa33250a50 (diff) | |
download | spack-d7c46d8c57b763798db16908c671bfb13e8aa9f6.tar.gz spack-d7c46d8c57b763798db16908c671bfb13e8aa9f6.tar.bz2 spack-d7c46d8c57b763798db16908c671bfb13e8aa9f6.tar.xz spack-d7c46d8c57b763798db16908c671bfb13e8aa9f6.zip |
CUDA: CUDAHOSTCXX Env (#16869)
This is a general CMake CUDA language hint to use the CXX
compiler has host compiler for NVCC. Seems like a good
default since we do not express the CUDA compiler in Spack
otherwise yet (e.g. no `self.compiler.cuda` or
`self.compiler.cudahostcxx`).
-rw-r--r-- | var/spack/repos/builtin/packages/cuda/package.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index ce1fdf69b9..5fd89cbaa1 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -77,6 +77,7 @@ class Cuda(Package): depends_on('libxml2', when='@10.1.243:') def setup_build_environment(self, env): + env.set('CUDAHOSTCXX', self.compiler.cxx) if self.spec.satisfies('@10.1.243:'): libxml2_home = self.spec['libxml2'].prefix env.set('LIBXML2HOME', libxml2_home) @@ -84,6 +85,7 @@ class Cuda(Package): def setup_run_environment(self, env): env.set('CUDA_HOME', self.prefix) + env.set('CUDAHOSTCXX', self.compiler.cxx) def install(self, spec, prefix): if os.path.exists('/tmp/cuda-installer.log'): |