diff options
author | Denis Davydov <davydden@gmail.com> | 2019-05-15 20:03:19 +0200 |
---|---|---|
committer | Gregory Lee <lee218@llnl.gov> | 2019-05-15 11:03:19 -0700 |
commit | 9d34326992fd467476380474d3101bc26eec16ed (patch) | |
tree | 854465ca91fa48e6cb2c93f5b180ea9b1e6a03f1 | |
parent | 5c021f54167952a139b9fd78833708bfdf9c4bf9 (diff) | |
download | spack-9d34326992fd467476380474d3101bc26eec16ed.tar.gz spack-9d34326992fd467476380474d3101bc26eec16ed.tar.bz2 spack-9d34326992fd467476380474d3101bc26eec16ed.tar.xz spack-9d34326992fd467476380474d3101bc26eec16ed.zip |
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
-rw-r--r-- | lib/spack/spack/build_systems/intel.py | 12 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/suite-sparse/package.py | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py index 36e0b966d1..73cdcd8eaf 100644 --- a/lib/spack/spack/build_systems/intel.py +++ b/lib/spack/spack/build_systems/intel.py @@ -696,6 +696,13 @@ class IntelPackage(PackageBase): 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 @@ class IntelPackage(PackageBase): 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 @@ class IntelPackage(PackageBase): ['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 diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index fc53051825..1d375acdfa 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -111,7 +111,7 @@ class SuiteSparse(Package): if 'tbb' in spec: make_args += [ 'SPQR_CONFIG=-DHAVE_TBB', - 'TBB=-L%s -ltbb' % spec['tbb'].prefix.lib, + 'TBB=%s' % spec['tbb'].libs.ld_flags, ] if '@5.3:' in spec: |