mariadb/storage/tokudb/CMakeLists.txt

56 lines
1.8 KiB
Text
Raw Normal View History

# 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)
cmake fixes for tokudb cmake/jemalloc.cmake: for dependencies to work, LIBJEMALLOC should be the target name, not the path storage/tokudb/CMakeLists.txt: * check the preconditions * disable bdb tests (compilation errors) * set variable, instead of SET_PROPERTY. same effect, but doesn't fail when a plugin is disabled (that is, a target does not exist) storage/tokudb/ft-index/CMakeLists.txt: cmake should not look into examples/ directory, there is hand-crafted examples/Makefile that cmake will overwrite storage/tokudb/ft-index/buildheader/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/cmake_modules/TokuMergeLibs.cmake: Libraries must be specified in the specific order, REMOVE_DUPLICATES cannot be used, because it destroys this order. (when OSLIBS contains "-lpthread -ljemalloc -lpthread", REMOVE_DUPLICATES makes it "-lpthread -ljemalloc". But a thread library *must* be *after* jemalloc) storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake: * 'which' might print errors to stderr, they are not important, shut them up * we don't have TOKUDB_DATA, no need to warn about it * don't configure_file into itself (with input=output) storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake: jemalloc is built externally to tokudb/ft-index storage/tokudb/ft-index/ft/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/ft/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/locktree/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/portability/CMakeLists.txt: s/jemalloc/libjemalloc/ storage/tokudb/ft-index/portability/os_malloc.cc: unnecessary include file storage/tokudb/ft-index/portability/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/src/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/util/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/utils/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name
2013-09-09 13:57:22 +02:00
RETURN()
ENDIF()
SET(ENV{TOKUDB_VERSION} "7.0.4")
cmake fixes for tokudb cmake/jemalloc.cmake: for dependencies to work, LIBJEMALLOC should be the target name, not the path storage/tokudb/CMakeLists.txt: * check the preconditions * disable bdb tests (compilation errors) * set variable, instead of SET_PROPERTY. same effect, but doesn't fail when a plugin is disabled (that is, a target does not exist) storage/tokudb/ft-index/CMakeLists.txt: cmake should not look into examples/ directory, there is hand-crafted examples/Makefile that cmake will overwrite storage/tokudb/ft-index/buildheader/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/cmake_modules/TokuMergeLibs.cmake: Libraries must be specified in the specific order, REMOVE_DUPLICATES cannot be used, because it destroys this order. (when OSLIBS contains "-lpthread -ljemalloc -lpthread", REMOVE_DUPLICATES makes it "-lpthread -ljemalloc". But a thread library *must* be *after* jemalloc) storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake: * 'which' might print errors to stderr, they are not important, shut them up * we don't have TOKUDB_DATA, no need to warn about it * don't configure_file into itself (with input=output) storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake: jemalloc is built externally to tokudb/ft-index storage/tokudb/ft-index/ft/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/ft/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/locktree/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/portability/CMakeLists.txt: s/jemalloc/libjemalloc/ storage/tokudb/ft-index/portability/os_malloc.cc: unnecessary include file storage/tokudb/ft-index/portability/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/src/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/util/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/utils/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name
2013-09-09 13:57:22 +02:00
SET(USE_BDB OFF CACHE BOOL "")
SET(USE_VALGRIND OFF CACHE BOOL "")
SET(BUILD_TESTING OFF CACHE BOOL "")
cmake fixes for tokudb cmake/jemalloc.cmake: for dependencies to work, LIBJEMALLOC should be the target name, not the path storage/tokudb/CMakeLists.txt: * check the preconditions * disable bdb tests (compilation errors) * set variable, instead of SET_PROPERTY. same effect, but doesn't fail when a plugin is disabled (that is, a target does not exist) storage/tokudb/ft-index/CMakeLists.txt: cmake should not look into examples/ directory, there is hand-crafted examples/Makefile that cmake will overwrite storage/tokudb/ft-index/buildheader/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/cmake_modules/TokuMergeLibs.cmake: Libraries must be specified in the specific order, REMOVE_DUPLICATES cannot be used, because it destroys this order. (when OSLIBS contains "-lpthread -ljemalloc -lpthread", REMOVE_DUPLICATES makes it "-lpthread -ljemalloc". But a thread library *must* be *after* jemalloc) storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake: * 'which' might print errors to stderr, they are not important, shut them up * we don't have TOKUDB_DATA, no need to warn about it * don't configure_file into itself (with input=output) storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake: jemalloc is built externally to tokudb/ft-index storage/tokudb/ft-index/ft/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/ft/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/locktree/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/portability/CMakeLists.txt: s/jemalloc/libjemalloc/ storage/tokudb/ft-index/portability/os_malloc.cc: unnecessary include file storage/tokudb/ft-index/portability/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/src/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/util/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/utils/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name
2013-09-09 13:57:22 +02:00
############################################
IF(DEFINED ENV{TOKUDB_VERSION})
SET(TOKUDB_VERSION $ENV{TOKUDB_VERSION})
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"")
ENDIF()
IF(DEFINED ENV{TOKUDB_PATCHES})
SET(TOKUDB_PATCHES $ENV{TOKUDB_PATCHES})
ADD_DEFINITIONS("-DTOKUDB_PATCHES=${TOKUDB_PATCHES}")
ENDIF()
ADD_SUBDIRECTORY(ft-index)
# TODO: clean up includes in ft-index
INCLUDE_DIRECTORIES(ft-index)
INCLUDE_DIRECTORIES(ft-index/include)
INCLUDE_DIRECTORIES(ft-index/portability)
INCLUDE_DIRECTORIES(ft-index/toku_include)
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/toku_include)
SET(TOKUDB_PLUGIN_DYNAMIC "ha_tokudb")
SET(TOKUDB_SOURCES ha_tokudb.cc)
MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY
COMPONENT "tokudb-engine"
2013-04-27 15:22:31 -03:00
LINK_LIBRARIES tokufractaltree_static tokuportability_static z stdc++)
cmake fixes for tokudb cmake/jemalloc.cmake: for dependencies to work, LIBJEMALLOC should be the target name, not the path storage/tokudb/CMakeLists.txt: * check the preconditions * disable bdb tests (compilation errors) * set variable, instead of SET_PROPERTY. same effect, but doesn't fail when a plugin is disabled (that is, a target does not exist) storage/tokudb/ft-index/CMakeLists.txt: cmake should not look into examples/ directory, there is hand-crafted examples/Makefile that cmake will overwrite storage/tokudb/ft-index/buildheader/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/cmake_modules/TokuMergeLibs.cmake: Libraries must be specified in the specific order, REMOVE_DUPLICATES cannot be used, because it destroys this order. (when OSLIBS contains "-lpthread -ljemalloc -lpthread", REMOVE_DUPLICATES makes it "-lpthread -ljemalloc". But a thread library *must* be *after* jemalloc) storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake: * 'which' might print errors to stderr, they are not important, shut them up * we don't have TOKUDB_DATA, no need to warn about it * don't configure_file into itself (with input=output) storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake: jemalloc is built externally to tokudb/ft-index storage/tokudb/ft-index/ft/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/ft/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/locktree/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/portability/CMakeLists.txt: s/jemalloc/libjemalloc/ storage/tokudb/ft-index/portability/os_malloc.cc: unnecessary include file storage/tokudb/ft-index/portability/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/src/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/util/tests/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name storage/tokudb/ft-index/utils/CMakeLists.txt: the syntax is ADD_EXECUTABLE(target source) and "source" is the file name
2013-09-09 13:57:22 +02:00
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -fuse-linker-plugin")
IF (INSTALL_SYSCONF2DIR)
INSTALL(FILES tokudb.cnf DESTINATION ${INSTALL_SYSCONF2DIR} COMPONENT tokudb-engine)
SET(CPACK_RPM_tokudb-engine_USER_FILELIST ${ignored} "%config(noreplace) ${INSTALL_SYSCONF2DIR}/*" PARENT_SCOPE)
ENDIF(INSTALL_SYSCONF2DIR)