Skip to content

Commit

Permalink
MDEV-8962 TokuDB tries to build on OS X, even when disabled in compil…
Browse files Browse the repository at this point in the history
…e flag

first add tokudb plugin (MYSQL_ADD_PLUGIN) then add dependent
targets (ADD_SUBDIRECTORY(ft-index))
  • Loading branch information
vuvova committed Nov 16, 2015
1 parent 2963381 commit 12c32bd
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions storage/tokudb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ int main() { return 0; }
" TOKUDB_OK)
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()
ENDIF()

Expand Down Expand Up @@ -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/portability)

SET(TOKUDB_PLUGIN_DYNAMIC "ha_tokudb")
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++)
TARGET_LINK_LIBRARIES(tokudb tokufractaltree_static tokuportability_static)

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")

Expand Down

0 comments on commit 12c32bd

Please sign in to comment.