likwid: search library path for compilation with hwloc (#39659)
This commit is contained in:
parent
19f8e9147d
commit
9a0a4eceaf
@ -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:"):
|
||||
|
Loading…
Reference in New Issue
Block a user