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:
parent
abad16c198
commit
2a9d1d444b
2 changed files with 9 additions and 4 deletions
|
@ -77,6 +77,13 @@ def lapack_libs(self):
|
||||||
"libflame", root=self.prefix, shared="+shared" in self.spec, recursive=True
|
"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):
|
def flag_handler(self, name, flags):
|
||||||
if name == "cflags":
|
if name == "cflags":
|
||||||
if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%aocc@4.1.0:"):
|
if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%aocc@4.1.0:"):
|
||||||
|
|
|
@ -98,13 +98,11 @@ def cmake_args(self):
|
||||||
args.append(self.define_from_variant("BUILD_ILP64", "ilp64"))
|
args.append(self.define_from_variant("BUILD_ILP64", "ilp64"))
|
||||||
|
|
||||||
if self.spec.satisfies("@4.0:"):
|
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(
|
args.append(
|
||||||
"-DAOCL_BLIS_INCLUDE_DIR={0}/blis".format(self.spec["amdblis"].prefix.include)
|
"-DAOCL_BLIS_INCLUDE_DIR={0}/blis".format(self.spec["amdblis"].prefix.include)
|
||||||
)
|
)
|
||||||
args.append(
|
args.append("-DAOCL_LIBFLAME=" + str(self.spec["amdlibflame"].libs))
|
||||||
"-DAOCL_LIBFLAME={0}/libflame.so".format(self.spec["amdlibflame"].prefix.lib)
|
|
||||||
)
|
|
||||||
args.append(
|
args.append(
|
||||||
"-DAOCL_LIBFLAME_INCLUDE_DIR={0}".format(self.spec["amdlibflame"].prefix.include)
|
"-DAOCL_LIBFLAME_INCLUDE_DIR={0}".format(self.spec["amdlibflame"].prefix.include)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue