diff options
-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: |