2013-09-26 18:05:54 +02:00
|
|
|
# ft-index only supports x86-64 and cmake-2.8.9+
|
|
|
|
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
|
|
|
|
NOT CMAKE_VERSION VERSION_LESS "2.8.9" AND
|
|
|
|
NOT WITHOUT_TOKUDB AND NOT WITHOUT_TOKUDB_STORAGE_ENGINE)
|
|
|
|
CHECK_CXX_SOURCE_COMPILES(
|
|
|
|
"
|
|
|
|
struct a {int b; int c; };
|
|
|
|
struct a d = { .b=1, .c=2 };
|
|
|
|
int main() { return 0; }
|
|
|
|
" TOKUDB_OK)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF(NOT TOKUDB_OK)
|
|
|
|
RETURN()
|
|
|
|
ENDIF()
|
|
|
|
|
2014-02-26 16:58:44 +01:00
|
|
|
IF(NOT DEFINED TOKUDB_VERSION)
|
|
|
|
IF(DEFINED ENV{TOKUDB_VERSION})
|
|
|
|
SET(TOKUDB_VERSION $ENV{TOKUDB_VERSION})
|
|
|
|
ENDIF()
|
2013-04-17 06:02:16 +02:00
|
|
|
ENDIF()
|
2014-02-26 16:58:44 +01:00
|
|
|
IF(DEFINED TOKUDB_VERSION)
|
|
|
|
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"")
|
2013-04-17 06:02:16 +02:00
|
|
|
ENDIF()
|
|
|
|
|
2013-04-27 19:54:48 +02:00
|
|
|
ADD_SUBDIRECTORY(ft-index)
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(ft-index)
|
|
|
|
INCLUDE_DIRECTORIES(ft-index/portability)
|
|
|
|
INCLUDE_DIRECTORIES(ft-index/util)
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index)
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index/buildheader)
|
2014-03-04 17:22:10 +01:00
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index/portability)
|
2013-04-17 06:02:04 +02:00
|
|
|
|
|
|
|
SET(TOKUDB_PLUGIN_DYNAMIC "ha_tokudb")
|
2013-04-17 06:02:11 +02:00
|
|
|
SET(TOKUDB_SOURCES ha_tokudb.cc)
|
2013-04-27 19:54:48 +02:00
|
|
|
MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY
|
2013-09-24 16:26:27 +02:00
|
|
|
LINK_LIBRARIES tokufractaltree_static tokuportability_static ${ZLIB_LIBRARY} stdc++)
|
2013-04-17 06:02:14 +02:00
|
|
|
SET_PROPERTY(TARGET tokudb APPEND PROPERTY LINK_FLAGS_RELEASE "-flto -fuse-linker-plugin")
|
2013-09-17 19:02:58 +02:00
|
|
|
SET_PROPERTY(TARGET tokudb APPEND PROPERTY LINK_FLAGS_RELWITHDEBINFO "-flto -fuse-linker-plugin")
|