diff options
Diffstat (limited to 'cmake/abi_check.cmake')
-rw-r--r-- | cmake/abi_check.cmake | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/cmake/abi_check.cmake b/cmake/abi_check.cmake index b9ff9f7af73..a671aeff342 100644 --- a/cmake/abi_check.cmake +++ b/cmake/abi_check.cmake @@ -19,20 +19,30 @@ # 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}) ELSE() SET(COMPILER ${CMAKE_C_COMPILER}) ENDIF() - SET(API_PREPROCESSOR_HEADER + SET(API_PREPROCESSOR_HEADER ${CMAKE_SOURCE_DIR}/include/mysql/plugin_audit.h ${CMAKE_SOURCE_DIR}/include/mysql/plugin_ftparser.h ${CMAKE_SOURCE_DIR}/include/mysql.h - ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h + ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h + ${CMAKE_SOURCE_DIR}/include/mysql/client_plugin.h + ${CMAKE_SOURCE_DIR}/include/mysql/plugin_auth.h ) ADD_CUSTOM_TARGET(abi_check ALL |