Commit 12c32bd9 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-8962 TokuDB tries to build on OS X, even when disabled in compile flag

first add tokudb plugin (MYSQL_ADD_PLUGIN) then add dependent
targets (ADD_SUBDIRECTORY(ft-index))
parent 29633814
...@@ -9,7 +9,15 @@ int main() { return 0; } ...@@ -9,7 +9,15 @@ int main() { return 0; }
" TOKUDB_OK) " TOKUDB_OK)
ENDIF() ENDIF()
IF(NOT TOKUDB_OK OR PLUGIN_TOKUDB STREQUAL "NO") IF(NOT TOKUDB_OK)
RETURN()
ENDIF()
SET(TOKUDB_SOURCES ha_tokudb.cc)
MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY
LINK_LIBRARIES ${ZLIB_LIBRARY} stdc++)
IF(NOT TARGET tokudb)
RETURN() RETURN()
ENDIF() ENDIF()
...@@ -77,10 +85,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index) ...@@ -77,10 +85,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index/buildheader) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index/buildheader)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index/portability) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index/portability)
SET(TOKUDB_PLUGIN_DYNAMIC "ha_tokudb") TARGET_LINK_LIBRARIES(tokudb tokufractaltree_static tokuportability_static)
SET(TOKUDB_SOURCES ha_tokudb.cc)
MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY
LINK_LIBRARIES tokufractaltree_static tokuportability_static ${ZLIB_LIBRARY} stdc++)
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -fuse-linker-plugin") SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -fuse-linker-plugin")
SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} -flto -fuse-linker-plugin") SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} -flto -fuse-linker-plugin")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment