cray-libsci: fix finding library
The fix is brittle, but not more brittle than before, where users had to specify the "correct" compiler ans prefix in the external definition
This commit is contained in:
parent
035131749b
commit
848816efa4
@ -62,7 +62,10 @@ def external_prefix(self):
|
||||
@property
|
||||
def blas_libs(self):
|
||||
shared = True if "+shared" in self.spec else False
|
||||
compiler = self.spec.compiler.name
|
||||
|
||||
candidates = [name for name in self.canonical_names.values() if name in self.prefix]
|
||||
if len(candidates) != 1:
|
||||
raise RuntimeError("cannot determine libsci libraries")
|
||||
|
||||
lib = []
|
||||
if self.spec.satisfies("+openmp") and self.spec.satisfies("+mpi"):
|
||||
@ -76,7 +79,7 @@ def blas_libs(self):
|
||||
|
||||
libname = []
|
||||
for lib_fmt in lib:
|
||||
libname.append(lib_fmt.format(self.canonical_names[compiler].lower()))
|
||||
libname.append(lib_fmt.format(candidates[0].lower()))
|
||||
|
||||
return find_libraries(libname, root=self.prefix.lib, shared=shared, recursive=False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user