mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Fix build on OSX
- Workaround linker bug that prevents linking aria test executables using -fno-common on OSX - Skip system readline detection (OSX readline is incompatible one) - Make Xcode generator work
This commit is contained in:
parent
9f010e3294
commit
f544b21fcb
4 changed files with 14 additions and 4 deletions
|
@ -210,7 +210,10 @@ MACRO (MYSQL_CHECK_READLINE)
|
||||||
IF(WITH_READLINE)
|
IF(WITH_READLINE)
|
||||||
MYSQL_USE_BUNDLED_READLINE()
|
MYSQL_USE_BUNDLED_READLINE()
|
||||||
ELSE()
|
ELSE()
|
||||||
|
# OSX includes incompatible readline lib
|
||||||
|
IF (NOT APPLE)
|
||||||
MYSQL_FIND_SYSTEM_READLINE()
|
MYSQL_FIND_SYSTEM_READLINE()
|
||||||
|
ENDIF()
|
||||||
IF(NOT USE_NEW_READLINE_INTERFACE)
|
IF(NOT USE_NEW_READLINE_INTERFACE)
|
||||||
MYSQL_FIND_SYSTEM_LIBEDIT()
|
MYSQL_FIND_SYSTEM_LIBEDIT()
|
||||||
IF(NOT USE_LIBEDIT_INTERFACE)
|
IF(NOT USE_LIBEDIT_INTERFACE)
|
||||||
|
|
|
@ -149,7 +149,9 @@ IF(UNIX)
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES
|
SET(CMAKE_REQUIRED_LIBRARIES
|
||||||
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
|
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
|
||||||
|
|
||||||
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
|
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
ENDIF()
|
||||||
LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT})
|
LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF)
|
OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF)
|
||||||
|
|
|
@ -27,7 +27,7 @@ TARGET_LINK_LIBRARIES(tests dbug)
|
||||||
ADD_EXECUTABLE(factorial my_main.c factorial.c)
|
ADD_EXECUTABLE(factorial my_main.c factorial.c)
|
||||||
TARGET_LINK_LIBRARIES(factorial dbug)
|
TARGET_LINK_LIBRARIES(factorial dbug)
|
||||||
|
|
||||||
IF(NOT WIN32)
|
IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
|
||||||
FIND_PROGRAM(GROFF groff)
|
FIND_PROGRAM(GROFF groff)
|
||||||
FIND_PROGRAM(NROFF nroff)
|
FIND_PROGRAM(NROFF nroff)
|
||||||
SET(OUTPUT_INC output1.r output2.r output3.r output4.r output5.r)
|
SET(OUTPUT_INC output1.r output2.r output3.r output4.r output5.r)
|
||||||
|
@ -63,5 +63,5 @@ IF(NOT WIN32)
|
||||||
ADD_CUSTOM_TARGET(t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.t)
|
ADD_CUSTOM_TARGET(t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.t)
|
||||||
ENDIF(NROFF)
|
ENDIF(NROFF)
|
||||||
|
|
||||||
ENDIF(NOT WIN32)
|
ENDIF()
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,11 @@ SET(ARIA_SOURCES ma_init.c ma_open.c ma_extra.c ma_info.c ma_rkey.c
|
||||||
ma_norec.c
|
ma_norec.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
# Workaround linker bug on OSX 10.7
|
||||||
|
ADD_DEFINITIONS(-fno-common)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
MYSQL_ADD_PLUGIN(aria ${ARIA_SOURCES}
|
MYSQL_ADD_PLUGIN(aria ${ARIA_SOURCES}
|
||||||
STORAGE_ENGINE STATIC_ONLY DEFAULT
|
STORAGE_ENGINE STATIC_ONLY DEFAULT
|
||||||
RECOMPILE_FOR_EMBEDDED)
|
RECOMPILE_FOR_EMBEDDED)
|
||||||
|
|
Loading…
Reference in a new issue