summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-28 19:26:00 +0200
committerSergei Golubchik <sergii@pisem.net>2012-03-28 19:26:00 +0200
commit0d5adca0de0a51b1f0bd49045fc4062eac7d1d25 (patch)
tree3cb7a294c5feebb813cf73b248c53d026aa11602 /cmake
parent20e706689df1eb87c696304797e9d6184c0a75bb (diff)
downloadmariadb-git-0d5adca0de0a51b1f0bd49045fc4062eac7d1d25.tar.gz
debug_sync is now a service, available to dynamically loaded plugins.
new make target - abi_update libservices/HOWTO: remove references to Makefile.am small tweaks
Diffstat (limited to 'cmake')
-rw-r--r--cmake/abi_check.cmake11
-rw-r--r--cmake/do_abi_check.cmake8
2 files changed, 17 insertions, 2 deletions
diff --git a/cmake/abi_check.cmake b/cmake/abi_check.cmake
index 9948f526b7a..cca595c5635 100644
--- a/cmake/abi_check.cmake
+++ b/cmake/abi_check.cmake
@@ -55,6 +55,17 @@ IF(CMAKE_COMPILER_IS_GNUCC AND RUN_ABI_CHECK)
VERBATIM
)
+ ADD_CUSTOM_TARGET(abi_update
+ COMMAND ${CMAKE_COMMAND}
+ -DCOMPILER=${COMPILER}
+ -DABI_UPDATE=1
+ -DSOURCE_DIR=${CMAKE_SOURCE_DIR}
+ -DBINARY_DIR=${CMAKE_BINARY_DIR}
+ "-DABI_HEADERS=${API_PREPROCESSOR_HEADER}"
+ -P ${CMAKE_SOURCE_DIR}/cmake/do_abi_check.cmake
+ VERBATIM
+ )
+
ADD_CUSTOM_TARGET(abi_check_all
COMMAND ${CMAKE_COMMAND}
-DCOMPILER=${COMPILER}
diff --git a/cmake/do_abi_check.cmake b/cmake/do_abi_check.cmake
index e42f11abde2..c831aaf8b52 100644
--- a/cmake/do_abi_check.cmake
+++ b/cmake/do_abi_check.cmake
@@ -75,8 +75,12 @@ FOREACH(file ${ABI_HEADERS})
EXECUTE_PROCESS(
COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE result)
IF(NOT ${result} EQUAL 0)
- MESSAGE(FATAL_ERROR
- "ABI check found difference between ${file}.pp and ${abi_check_out}")
+ IF(ABI_UPDATE)
+ EXECUTE_PROCESS(COMMAND mv -v ${abi_check_out} ${file}.pp)
+ ELSE(ABI_UPDATE)
+ MESSAGE(FATAL_ERROR
+ "ABI check found difference between ${file}.pp and ${abi_check_out}")
+ ENDIF(ABI_UPDATE)
ENDIF()
FILE(REMOVE ${abi_check_out})
ENDFOREACH()