Commit 46c818de authored by Sandro Knauß's avatar Sandro Knauß Committed by Ben Cooksley

Skip static libraries (as well as those without versions) when preparing ABI data.

Differential Revision: https://phabricator.kde.org/D17476
parent 741d95b3
......@@ -72,6 +72,7 @@ def cmake_parser(lines: List) -> Dict:
"INTERFACE_LINK_LIBRARIES",
"INTERFACE_COMPILE_OPTIONS",
"INTERFACE_COMPILE_DEFINITIONS",
"IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG",
]
tmpKeyword = None
......@@ -150,7 +151,7 @@ class Library:
self.mlines = self.__mlines
# Extract the version number of the library for easier use
self.version = self.__parser_output["variables"]["PACKAGE_VERSION"] # type: str
self.version = self.__parser_output["variables"].get("PACKAGE_VERSION") # type: str
# targets the targets of the libary ( existing so files)
# a dict with keys, SONAME = the SONAME of the lib
......@@ -174,12 +175,15 @@ class Library:
# Library names (sonames)
# The path to the CMake library package
# Any include directories specified by the CMake library package
target = {
"SONAME": re.search("\.([\d]*)$",value["IMPORTED_SONAME_DEBUG"][0]).group(1),
"path": value["IMPORTED_LOCATION_DEBUG"][0],
"include_dirs": parseIncludeDirs(value["INTERFACE_INCLUDE_DIRECTORIES"]),
}
self.targets[t]=target
try:
target = {
"SONAME": re.search("\.([\d]*)$",value["IMPORTED_SONAME_DEBUG"][0]).group(1),
"path": value["IMPORTED_LOCATION_DEBUG"][0],
"include_dirs": parseIncludeDirs(value["INTERFACE_INCLUDE_DIRECTORIES"]),
}
self.targets[t]=target
except IndexError:
pass
def createABIDump(self, runtimeEnvironment=None) -> None:
"""run abi-compliance-checker (acc) to create a ABIDump tar gz
......@@ -297,6 +301,13 @@ retval = 0
# Now we generate the ABI dumps for every library we have found
for library in foundLibraries:
try:
#run CMake for library
library.runCMake( runtimeEnvironment=buildEnvironment )
if not library.version:
logging.warning("{name} has no version: skipping.".format(name=library.name))
continue
# Create the ABI Dump for this library
library.createABIDump( runtimeEnvironment=buildEnvironment )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment