Changeset View
Changeset View
Standalone View
Standalone View
databases/mariadb101-client/files/patch-cmake_jemalloc.cmake
Upstreamed https://github.com/MariaDB/server/pull/139 | # Upstreamed https://github.com/MariaDB/server/pull/140 | ||||
--- cmake/jemalloc.cmake.orig 2015-12-16 16:05:44 UTC | --- cmake/jemalloc.cmake.orig 2015-12-23 15:33:29 UTC | ||||
+++ cmake/jemalloc.cmake | +++ cmake/jemalloc.cmake | ||||
@@ -20,11 +20,21 @@ MACRO (CHECK_JEMALLOC) | @@ -12,7 +12,12 @@ MACRO(JEMALLOC_TRY_STATIC) | ||||
SET(CMAKE_REQUIRED_LIBRARIES pthread dl m) | ENDMACRO() | ||||
SET(what bundled) | |||||
ELSE() | MACRO(JEMALLOC_TRY_DYNAMIC) | ||||
- SET(libname jemalloc) | - SET(libname jemalloc) | ||||
+ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND | + IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND | ||||
+ CMAKE_SYSTEM_VERSION STRGREATER "10.0") | + CMAKE_SYSTEM_VERSION STRGREATER "10.0") | ||||
+ SET(libname c) | + SET(libname c) | ||||
+ ELSE() | + ELSE() | ||||
+ SET(libname jemalloc) | + SET(libname jemalloc) | ||||
+ ENDIF() | + ENDIF() | ||||
SET(what system) | SET(what system) | ||||
ENDIF() | CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_DYNAMIC_JEMALLOC) | ||||
ENDMACRO() | |||||
koobs: Can these be overridden using CMake arguments / environment variables instead of patches? | |||||
Not Done Inline ActionsNot at the moment. jemalloc is in base in FreeBSD and the MariaDB doesn't detect that correctly brnrd: Not at the moment. jemalloc is in base in FreeBSD and the MariaDB doesn't detect that correctly | |||||
Not Done Inline ActionsRefactored patch and submitted it upstream brnrd: Refactored patch and [[ https://github.com/MariaDB/server/pull/140 | submitted it upstream ]] | |||||
- CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC) | |||||
+ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND | |||||
+ CMAKE_SYSTEM_VERSION STRGREATER "10.0") | |||||
+ SET(HAVE_JEMALLOC ON) | |||||
+ ELSE() | |||||
+ CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC) | |||||
+ ENDIF() | |||||
SET(CMAKE_REQUIRED_LIBRARIES) | |||||
IF (HAVE_JEMALLOC) |
Can these be overridden using CMake arguments / environment variables instead of patches?