fix suite-sparse built with tbb from intel-parallel-studio (#11134)

* fix suite-sparse built with tbb from intel-parallel-studio

* intel: add tbb_headers, strip newline from cxx_lib

* use property
This commit is contained in:
Denis Davydov
2019-05-15 20:03:19 +02:00
committed by Gregory Lee
parent 5c021f5416
commit 9d34326992
2 changed files with 12 additions and 2 deletions

View File

@@ -695,6 +695,13 @@ def _gcc_executable(self):
debug_print(gcc_name)
return Executable(gcc_name)
@property
def tbb_headers(self):
# Note: TBB is included as
# #include <tbb/task_scheduler_init.h>
return HeaderList([
self.component_include_dir('tbb') + '/dummy.h'])
@property
def tbb_libs(self):
'''Supply LibraryList for linking TBB'''
@@ -710,7 +717,7 @@ def tbb_libs(self):
cxx_lib_path = gcc(
'--print-file-name', 'libstdc++.%s' % dso_suffix, output=str)
libs = tbb_lib + LibraryList(cxx_lib_path)
libs = tbb_lib + LibraryList(cxx_lib_path.rstrip())
debug_print(libs)
return libs
@@ -941,6 +948,9 @@ def headers(self):
['mkl_cblas', 'mkl_lapacke'],
root=self.component_include_dir('mkl'),
recursive=False)
if '+tbb' in self.spec or self.provides('tbb'):
result += self.tbb_headers
debug_print(result)
return result