likwid: search library path for compilation with hwloc (#39659)

This commit is contained in:
Thomas Gruber 2023-09-11 17:03:21 +02:00 committed by GitHub
parent 19f8e9147d
commit 9a0a4eceaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,12 +188,18 @@ def install(self, spec, prefix):
"HWLOC_INCLUDE_DIR = {0}".format(spec["hwloc"].prefix.include),
"config.mk",
)
filter_file(
"^#HWLOC_LIB_DIR.*",
"HWLOC_LIB_DIR = {0}".format(spec["hwloc"].prefix.lib),
"config.mk",
)
filter_file("^#HWLOC_LIB_NAME.*", "HWLOC_LIB_NAME = hwloc", "config.mk")
ll = spec["hwloc"].libs
if len(ll.directories) > 0 and len(ll.names) > 0:
filter_file(
"^#HWLOC_LIB_DIR.*",
"HWLOC_LIB_DIR = {0}".format(ll.directories[0]),
"config.mk",
)
filter_file(
"^#HWLOC_LIB_NAME.*", "HWLOC_LIB_NAME = {0}".format(ll.names[0]), "config.mk"
)
else:
raise InstallError("Failed to find library path and/or name of hwloc dependency")
# https://github.com/RRZE-HPC/likwid/issues/287
if self.spec.satisfies("@:5.0.2 %gcc@10:"):