diff options
author | Tom Payerle <payerle@umd.edu> | 2020-06-06 17:12:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-06 16:12:46 -0500 |
commit | 885808cc13d90a12a70e9ab082934b5222298004 (patch) | |
tree | bfcb5fc0a71f4a09a4847f286809050b811ff79d | |
parent | c835b931091eecbf4b74f2c48be9086d8f78ea00 (diff) | |
download | spack-885808cc13d90a12a70e9ab082934b5222298004.tar.gz spack-885808cc13d90a12a70e9ab082934b5222298004.tar.bz2 spack-885808cc13d90a12a70e9ab082934b5222298004.tar.xz spack-885808cc13d90a12a70e9ab082934b5222298004.zip |
intel-tbb: Fix for #16938 add custom libs method (#16972)
* intel-tbb: Fix for #16938 add custom libs method
Override the libs method to look for libraries of form libtbb*
(instead of inherited which looks for libintel-tbb*)
* Fixing pre-existing flake8 issues
-rw-r--r-- | var/spack/repos/builtin/packages/intel-tbb/package.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 94eec8a06e..c470e8933b 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -132,22 +132,22 @@ class IntelTbb(Package): for f in fs: lines = open(f).readlines() of = open(f, "w") - for l in lines: - if l.strip().startswith("CPLUS ="): + for lin in lines: + if lin.strip().startswith("CPLUS ="): of.write("# coerced to spack\n") of.write("CPLUS = $(CXX)\n") - elif l.strip().startswith("CONLY ="): + elif lin.strip().startswith("CONLY ="): of.write("# coerced to spack\n") of.write("CONLY = $(CC)\n") else: - of.write(l) + of.write(lin) def install(self, spec, prefix): # Deactivate use of RTM with GCC when on an OS with a very old # assembler. if (spec.satisfies('%gcc@4.8.0: os=rhel6') - or spec.satisfies('%gcc@4.8.0: os=centos6') - or spec.satisfies('%gcc@4.8.0: os=scientific6')): + or spec.satisfies('%gcc@4.8.0: os=centos6') + or spec.satisfies('%gcc@4.8.0: os=scientific6')): filter_file(r'RTM_KEY.*=.*rtm.*', 'RTM_KEY =', join_path('build', 'linux.gcc.inc')) @@ -224,3 +224,9 @@ class IntelTbb(Package): # Replace @rpath in ids with full path if sys.platform == 'darwin': fix_darwin_install_name(self.prefix.lib) + + @property + def libs(self): + shared = True if '+shared' in self.spec else False + return find_libraries( + 'libtbb*', root=self.prefix, shared=shared, recursive=True) |