summaryrefslogtreecommitdiff
path: root/cmake/abi_check.cmake
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-04-28 13:13:36 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-04-28 13:13:36 +0300
commitc7b12ecc6e065a8d7e1327843234f84f0571f231 (patch)
tree37c614164e1327b27a19c841d6e00bd7ddf3b0e3 /cmake/abi_check.cmake
parent822e09fb64b1319eec687b0d66a42d42fc8d78bb (diff)
downloadmariadb-git-c7b12ecc6e065a8d7e1327843234f84f0571f231.tar.gz
Backport of (part of) bug #11760838 to 5.5.
Enabled the ABI check to run on MacOSX.
Diffstat (limited to 'cmake/abi_check.cmake')
-rw-r--r--cmake/abi_check.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/abi_check.cmake b/cmake/abi_check.cmake
index 2488bcefe33..a671aeff342 100644
--- a/cmake/abi_check.cmake
+++ b/cmake/abi_check.cmake
@@ -19,8 +19,16 @@
# plugin_audit.h and plugin_ftparser.h.
#
# We use gcc specific preprocessing command and sed/diff, so it will
-# only be run on Unix and only if gcc is used.
-IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
+# only be run on Unix and only if gcc is used. On some Unixes,
+# (Solaris) sed or diff might act differently from GNU, so we run only
+# on systems we can trust.
+IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Linux")
+ SET(RUN_ABI_CHECK 1)
+ELSE()
+ SET(RUN_ABI_CHECK 0)
+ENDIF()
+
+IF(CMAKE_COMPILER_IS_GNUCC AND RUN_ABI_CHECK)
IF(CMAKE_C_COMPILER MATCHES "ccache$")
SET(COMPILER ${CMAKE_C_COMPILER_ARG1})
STRING(REGEX REPLACE "^ " "" COMPILER ${COMPILER})