mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
72 lines
2.6 KiB
CMake
72 lines
2.6 KiB
CMake
# 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")
|
|
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 OR WITHOUT_TOKUDB OR WITHOUT_TOKUDB_STORAGE_ENGINE)
|
|
RETURN()
|
|
ENDIF()
|
|
|
|
############################################
|
|
SET(TOKUDB_VERSION "7.1.6")
|
|
SET(TOKUDB_DEB_FILES "usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-server-10.0/README-TOKUDB\nusr/share/doc/mariadb-server-10.0/README.md" PARENT_SCOPE)
|
|
SET(USE_BDB OFF CACHE BOOL "")
|
|
SET(USE_VALGRIND OFF CACHE BOOL "")
|
|
SET(BUILD_TESTING OFF CACHE BOOL "")
|
|
MARK_AS_ADVANCED(BUILDNAME)
|
|
MARK_AS_ADVANCED(BUILD_TESTING)
|
|
MARK_AS_ADVANCED(CMAKE_TOKUDB_REVISION)
|
|
MARK_AS_ADVANCED(LIBTOKUDB)
|
|
MARK_AS_ADVANCED(LIBTOKUPORTABILITY)
|
|
MARK_AS_ADVANCED(TOKUDB_DATA)
|
|
MARK_AS_ADVANCED(TOKU_DEBUG_PARANOID)
|
|
MARK_AS_ADVANCED(USE_BDB)
|
|
MARK_AS_ADVANCED(USE_VALGRIND)
|
|
MARK_AS_ADVANCED(XZ_SOURCE_DIR)
|
|
############################################
|
|
|
|
IF(NOT DEFINED TOKUDB_VERSION)
|
|
IF(DEFINED ENV{TOKUDB_VERSION})
|
|
SET(TOKUDB_VERSION $ENV{TOKUDB_VERSION})
|
|
ENDIF()
|
|
ENDIF()
|
|
IF(DEFINED TOKUDB_VERSION)
|
|
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"")
|
|
ENDIF()
|
|
|
|
IF(DEFINED TOKUDB_NOPATCH_CONFIG)
|
|
ADD_DEFINITIONS("-DTOKUDB_NOPATCH_CONFIG=${TOKUDB_NOPATCH_CONFIG}")
|
|
ENDIF()
|
|
|
|
IF(DEFINED TOKUDB_CHECK_JEMALLOC)
|
|
ADD_DEFINITIONS("-DTOKUDB_CHECK_JEMALLOC=${TOKUDB_CHECK_JEMALLOC}")
|
|
ENDIF()
|
|
|
|
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)
|
|
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++)
|
|
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(CPACK_RPM_server_PACKAGE_OBSOLETES
|
|
"${CPACK_RPM_server_PACKAGE_OBSOLETES} MariaDB-tokudb-engine < 10.0.5" PARENT_SCOPE)
|
|
|
|
IF (INSTALL_SYSCONF2DIR)
|
|
INSTALL(FILES tokudb.cnf DESTINATION ${INSTALL_SYSCONF2DIR} COMPONENT Server)
|
|
ENDIF(INSTALL_SYSCONF2DIR)
|