4 # ABI Check related macros
6 # ABI compliance checker can be obtained from
7 # http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
8 # Checked using version 1.21.12
10 MACRO(ABICHECK _libname)
11 set(ABICHECK_TMPDIR ${CMAKE_CURRENT_BINARY_DIR}/abi-check-headers)
12 set(ABICHECK_COMMAND abi-compliance-checker -l ${_libname} -v2 ${FULL_SO_VERSION}
13 -relpath ${CMAKE_CURRENT_BINARY_DIR} -dump-abi abi-descriptor.xml
14 || cat ${CMAKE_CURRENT_BINARY_DIR}/logs/${_libname}/[0-9]*/log.txt)
15 get_directory_property(INCLUDE_DIRS INCLUDE_DIRECTORIES)
16 list(REMOVE_DUPLICATES INCLUDE_DIRS)
17 string(REGEX REPLACE ";" "\n" INCLUDE_DIRS "${INCLUDE_DIRS}")
18 configure_file(../abi-descriptor.template abi-descriptor.xml)
19 # discover and substitute list of include directories for ABI compatibility
21 file(GLOB HEADERS *.h)
22 file(MAKE_DIRECTORY ${ABICHECK_TMPDIR})
23 file(COPY ${HEADERS} ../ws_symbol_export.h DESTINATION ${ABICHECK_TMPDIR})
24 add_custom_target(dumpabi-${_libname} DEPENDS ${_libname}.abi.tar.gz)