bugfix rmda-core external find library (#34484)
* Added a more robust check for an external version of the library. Included a guard to identify when the library gives no discernible version information and then to substitute with "unknown_ver" identifier.
This commit is contained in:
parent
c0b458e38a
commit
e804671fc0
1 changed files with 6 additions and 1 deletions
|
@ -64,7 +64,12 @@ class RdmaCore(CMakePackage):
|
|||
|
||||
@classmethod
|
||||
def determine_version(cls, lib):
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d+\.\d+)", lib)
|
||||
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d+(?:\.\d+)?)", lib)
|
||||
if match and match.group(1) == "0":
|
||||
# On some systems there is a truncated shared library name that does not
|
||||
# sufficient version information, return a clear indicator of that
|
||||
return "unknown_ver"
|
||||
|
||||
return match.group(1) if match else None
|
||||
|
||||
# NOTE: specify CMAKE_INSTALL_RUNDIR explicitly to prevent rdma-core from
|
||||
|
|
Loading…
Reference in a new issue