aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2013-10-15 07:30:05 +0000
committerBalint Reczey <balint@balintreczey.hu>2013-10-15 07:30:05 +0000
commit8956ee2a567e2e2e4d8b8704d80beb9cde6678b1 (patch)
tree51cf19e31d2856428b0195e4b131435c93c9536a /cmake/modules
parent66de01339985521b2b69fcfcb4cd0587dea63fba (diff)
Factor out common parts of ABI checks to UseABICheck.cmake
svn path=/trunk/; revision=52614
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/UseABICheck.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/cmake/modules/UseABICheck.cmake b/cmake/modules/UseABICheck.cmake
new file mode 100644
index 0000000000..fcbe2d55b6
--- /dev/null
+++ b/cmake/modules/UseABICheck.cmake
@@ -0,0 +1,20 @@
+#
+# ABI Check related macros
+#
+# ABI compliance checker can be obtained from
+# http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
+# Checked using version 1.21.12
+
+MACRO(ABICHECK _libname)
+ get_directory_property(INCLUDE_DIRS INCLUDE_DIRECTORIES)
+ list(REMOVE_DUPLICATES INCLUDE_DIRS)
+ string(REGEX REPLACE ";" "\n" INCLUDE_DIRS "${INCLUDE_DIRS}")
+ configure_file(../abi-descriptor.template abi-descriptor.xml)
+ # discover and substitute list of include directories for ABI compatibility
+ # checks
+ file(GLOB HEADERS *.h)
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/abi-check-headers)
+ file(COPY ${HEADERS} ../ws_symbol_export.h DESTINATION abi-check-headers)
+ add_custom_target(dumpabi-${_libname} DEPENDS ${_libname}.abi.tar.gz)
+ENDMACRO()
+