cuda: add NVHPC_CUDA_HOME. (#40507)

* [cuda] Add NVHPC_CUDA_HOME.

* Add CUDA_HOME and NVHC_CUDA_HOME to cuda's dependent build env.

---------

Co-authored-by: Dominic Hofer <dominic.hofer@meteoswiss.ch>
This commit is contained in:
Dominic Hofer 2023-10-26 01:22:22 +02:00 committed by GitHub
parent 2a245fdd21
commit d9edc92119
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -582,6 +582,8 @@ def setup_build_environment(self, env):
def setup_dependent_build_environment(self, env, dependent_spec):
env.set("CUDAHOSTCXX", dependent_spec.package.compiler.cxx)
env.set("CUDA_HOME", self.prefix)
env.set("NVHPC_CUDA_HOME", self.prefix)
@property
def cmake_prefix_paths(self):
@ -593,6 +595,7 @@ def cmake_prefix_paths(self):
def setup_run_environment(self, env):
env.set("CUDA_HOME", self.prefix)
env.set("NVHPC_CUDA_HOME", self.prefix)
def install(self, spec, prefix):
if os.path.exists("/tmp/cuda-installer.log"):