You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.6 KiB

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
12 years ago
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
12 years ago
  1. # old cmake does not have ExternalProject file
  2. IF(CMAKE_VERSION VERSION_LESS "2.8.6")
  3. MACRO (CHECK_JEMALLOC)
  4. ENDMACRO()
  5. RETURN()
  6. ENDIF()
  7. INCLUDE(ExternalProject)
  8. MACRO (USE_BUNDLED_JEMALLOC)
  9. SET(SOURCE_DIR "${CMAKE_SOURCE_DIR}/extra/jemalloc")
  10. SET(BINARY_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/extra/jemalloc/build")
  11. SET(LIBJEMALLOC "libjemalloc")
  12. SET(JEMALLOC_CONFIGURE_OPTS "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" "--with-private-namespace=jemalloc_internal_" "--enable-cc-silence")
  13. IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT APPLE) # see the comment in CMakeLists.txt
  14. LIST(APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug)
  15. ENDIF()
  16. ExternalProject_Add(jemalloc
  17. PREFIX extra/jemalloc
  18. SOURCE_DIR ${SOURCE_DIR}
  19. BINARY_DIR ${BINARY_DIR}
  20. STAMP_DIR ${BINARY_DIR}
  21. CONFIGURE_COMMAND "${SOURCE_DIR}/configure" ${JEMALLOC_CONFIGURE_OPTS}
  22. BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} "build_lib_static"
  23. INSTALL_COMMAND ""
  24. )
  25. ADD_LIBRARY(libjemalloc STATIC IMPORTED)
  26. SET_TARGET_PROPERTIES(libjemalloc PROPERTIES IMPORTED_LOCATION "${BINARY_DIR}/lib/libjemalloc_pic.a")
  27. ADD_DEPENDENCIES(libjemalloc jemalloc)
  28. ENDMACRO()
  29. SET(WITH_JEMALLOC "yes" CACHE STRING
  30. "Which jemalloc to use (possible values are 'no', 'bundled', 'yes' (same as bundled)")
  31. #"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
  32. MACRO (CHECK_JEMALLOC)
  33. IF(WIN32)
  34. SET(WITH_JEMALLOC "no")
  35. ENDIF()
  36. IF(WITH_JEMALLOC STREQUAL "bundled" OR WITH_JEMALLOC STREQUAL "yes")
  37. USE_BUNDLED_JEMALLOC()
  38. ENDIF()
  39. ENDMACRO()