Add setup_dependent_build_environment() method to nvhpc package (#22578)

Fix #22520

Co-authored-by: Scott McMillan <smcmillan@nvidia.com>
This commit is contained in:
Scott McMillan 2021-03-30 13:37:26 -05:00 committed by GitHub
parent eb48b29375
commit a78677a835
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,6 +123,23 @@ def setup_run_environment(self, env):
env.prepend_path('CPATH', mpi_prefix.include)
env.prepend_path('LD_LIBRARY_PATH', mpi_prefix.lib)
def setup_dependent_build_environment(self, env, dependent_spec):
prefix = Prefix(join_path(self.prefix,
'Linux_%s' % self.spec.target.family,
self.version, 'compilers'))
env.prepend_path('CPATH', prefix.include)
env.prepend_path('LIBRARY_PATH', prefix.lib)
env.prepend_path('LD_LIBRARY_PATH', prefix.lib)
if '+mpi' in self.spec:
mpi_prefix = Prefix(join_path(self.prefix,
'Linux_%s' % self.spec.target.family,
self.version, 'comm_libs', 'mpi'))
env.prepend_path('CPATH', mpi_prefix.include)
env.prepend_path('LD_LIBRARY_PATH', mpi_prefix.lib)
def setup_dependent_package(self, module, dependent_spec):
if '+mpi' in self.spec or self.provides('mpi'):
mpi_prefix = Prefix(join_path(self.prefix,