aocl-sparse: use .libs instead of hard-coded value for library computation (#39868)

Co-authored-by: matooley <phil.tooley@amd.com>
This commit is contained in:
AMD Toolchain Support 2023-09-21 22:17:29 +05:30 committed by GitHub
parent abad16c198
commit 2a9d1d444b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -77,6 +77,13 @@ def lapack_libs(self):
"libflame", root=self.prefix, shared="+shared" in self.spec, recursive=True
)
@property
def libs(self):
"""find libflame libs function"""
return find_libraries(
"libflame", root=self.prefix, shared="+shared" in self.spec, recursive=True
)
def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%aocc@4.1.0:"):

View file

@ -98,13 +98,11 @@ def cmake_args(self):
args.append(self.define_from_variant("BUILD_ILP64", "ilp64"))
if self.spec.satisfies("@4.0:"):
args.append("-DAOCL_BLIS_LIB={0}/libblis.so".format(self.spec["amdblis"].prefix.lib))
args.append("-DAOCL_BLIS_LIB=" + str(self.spec["amdblis"].libs))
args.append(
"-DAOCL_BLIS_INCLUDE_DIR={0}/blis".format(self.spec["amdblis"].prefix.include)
)
args.append(
"-DAOCL_LIBFLAME={0}/libflame.so".format(self.spec["amdlibflame"].prefix.lib)
)
args.append("-DAOCL_LIBFLAME=" + str(self.spec["amdlibflame"].libs))
args.append(
"-DAOCL_LIBFLAME_INCLUDE_DIR={0}".format(self.spec["amdlibflame"].prefix.include)
)