diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/build_configurations/mysql_release.cmake | 1 | ||||
-rw-r--r-- | cmake/dtrace.cmake | 3 | ||||
-rw-r--r-- | cmake/for_clients.cmake | 2 | ||||
-rw-r--r-- | cmake/install_layout.cmake | 2 | ||||
-rw-r--r-- | cmake/jemalloc.cmake | 49 | ||||
-rw-r--r-- | cmake/plugin.cmake | 7 | ||||
-rw-r--r-- | cmake/wsrep.cmake | 2 |
7 files changed, 35 insertions, 31 deletions
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 75ce57e45e0..ef9713e0556 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -94,6 +94,7 @@ ELSEIF(DEB) ELSE() SET(WITH_SSL bundled CACHE STRING "") SET(WITH_ZLIB bundled CACHE STRING "") + SET(WITH_JEMALLOC static CACHE STRING "") ENDIF() IF(NOT COMPILATION_COMMENT) diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake index 5d0bb7ff8c9..3edcdc4c1c5 100644 --- a/cmake/dtrace.cmake +++ b/cmake/dtrace.cmake @@ -86,6 +86,9 @@ IF(ENABLE_DTRACE) ${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h ${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h ) +ELSE() + CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/probes_mysql_nodtrace.h.in + ${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h COPYONLY) ENDIF() FUNCTION(DTRACE_INSTRUMENT target) diff --git a/cmake/for_clients.cmake b/cmake/for_clients.cmake index 01b4c0a84f7..dd79ea1039d 100644 --- a/cmake/for_clients.cmake +++ b/cmake/for_clients.cmake @@ -25,7 +25,7 @@ MACRO(EXTRACT_LINK_LIBRARIES target var) # Filter out "general", it is not a library, just CMake hint # Also, remove duplicates IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ") - IF (lib MATCHES "^\\-l") + IF (lib MATCHES "^\\-") SET(${var} "${${var}} ${lib} ") ELSEIF(lib MATCHES "^/") IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$") diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index 757166b7c50..d1a261f8cef 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -137,7 +137,7 @@ SET(INSTALL_SCRIPTDIR_RPM "bin") SET(INSTALL_SYSCONFDIR_RPM "/etc") SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d") # -IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") +IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(INSTALL_LIBDIR_RPM "lib64") SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") ELSE() diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake index 05402668c7d..5ad636d0e6c 100644 --- a/cmake/jemalloc.cmake +++ b/cmake/jemalloc.cmake @@ -3,20 +3,6 @@ INCLUDE (CheckLibraryExists) SET(WITH_JEMALLOC auto CACHE STRING "Build with jemalloc. Possible values are 'yes', 'no', 'static', 'auto'") -MACRO(JEMALLOC_TRY_STATIC) - SET(libname jemalloc_pic) - SET(CMAKE_REQUIRED_LIBRARIES pthread dl m) - SET(what bundled) - CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_STATIC_JEMALLOC) - SET(CMAKE_REQUIRED_LIBRARIES) -ENDMACRO() - -MACRO(JEMALLOC_TRY_DYNAMIC) - SET(libname jemalloc) - SET(what system) - CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_DYNAMIC_JEMALLOC) -ENDMACRO() - MACRO (CHECK_JEMALLOC) # compatibility with old WITH_JEMALLOC values IF(WITH_JEMALLOC STREQUAL "bundled") @@ -26,21 +12,30 @@ MACRO (CHECK_JEMALLOC) SET(WITH_JEMALLOC "yes") ENDIF() - IF (WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto") - JEMALLOC_TRY_DYNAMIC() - ENDIF() + IF(WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto" OR + WITH_JEMALLOC STREQUAL "static") - IF (WITH_JEMALLOC STREQUAL "static" OR WITH_JEMALLOC STREQUAL "auto" - AND NOT HAVE_DYNAMIC_JEMALLOC) - JEMALLOC_TRY_STATIC() - ENDIF() + IF(WITH_JEMALLOC STREQUAL "static") + SET(libname jemalloc_pic) + SET(CMAKE_REQUIRED_LIBRARIES pthread dl m) + SET(what bundled) + ELSE() + SET(libname jemalloc c) + SET(what system) + ENDIF() + + FOREACH(lib ${libname}) + CHECK_LIBRARY_EXISTS(${lib} malloc_stats_print "" HAVE_JEMALLOC_IN_${lib}) + IF (HAVE_JEMALLOC_IN_${lib}) + SET(LIBJEMALLOC ${lib}) + SET(MALLOC_LIBRARY "${what} jemalloc") + BREAK() + ENDIF() + ENDFOREACH() + SET(CMAKE_REQUIRED_LIBRARIES) - IF (libname) - IF (HAVE_DYNAMIC_JEMALLOC OR HAVE_STATIC_JEMALLOC) - SET(LIBJEMALLOC ${libname}) - SET(MALLOC_LIBRARY "${what} jemalloc") - ELSEIF (NOT WITH_JEMALLOC STREQUAL "auto") - MESSAGE(FATAL_ERROR "${libname} is not found") + IF (NOT LIBJEMALLOC AND NOT WITH_JEMALLOC STREQUAL "auto") + MESSAGE(FATAL_ERROR "jemalloc is not found") ENDIF() ENDIF() ENDMACRO() diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 8bc9df973c0..49c38b3577b 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -34,6 +34,7 @@ MACRO(MYSQL_ADD_PLUGIN) "LINK_LIBRARIES;DEPENDENCIES" ${ARGN} ) + IF(NOT WITHOUT_SERVER OR ARG_CLIENT) # Add common include directories INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include @@ -236,13 +237,17 @@ MACRO(MYSQL_ADD_PLUGIN) INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}") ENDIF() + ENDIF(NOT WITHOUT_SERVER OR ARG_CLIENT) ENDMACRO() # Add all CMake projects under storage and plugin # subdirectories, configure sql_builtins.cc MACRO(CONFIGURE_PLUGINS) - FILE(GLOB dirs_storage ${CMAKE_SOURCE_DIR}/storage/*) + IF(NOT WITHOUT_SERVER) + FILE(GLOB dirs_storage ${CMAKE_SOURCE_DIR}/storage/*) + ENDIF() + FILE(GLOB dirs_plugin ${CMAKE_SOURCE_DIR}/plugin/*) FOREACH(dir ${dirs_storage} ${dirs_plugin}) IF (EXISTS ${dir}/CMakeLists.txt) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 64266811811..de7fb5eb946 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -26,7 +26,7 @@ ENDIF() OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default}) # Set the patch version -SET(WSREP_PATCH_VERSION "11") +SET(WSREP_PATCH_VERSION "13") # Obtain wsrep API version FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION |