use mimalloc #6

Merged
andreacavalli merged 1 commits from :allocator into fork 2020-01-06 13:02:49 +01:00
Showing only changes of commit faa0794f9e - Show all commits

View File

@ -145,6 +145,7 @@ endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON) set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
find_package(mimalloc 1.0 REQUIRED)
if (THREADS_HAVE_PTHREAD_ARG) if (THREADS_HAVE_PTHREAD_ARG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
@ -758,7 +759,9 @@ target_include_directories(tdclient PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${TL_TD_AUTO_INCLUDES}> $<BUILD_INTERFACE:${TL_TD_AUTO_INCLUDES}>
) )
target_link_libraries(tdclient PRIVATE tdcore) target_link_libraries(tdclient PRIVATE tdcore)
target_link_libraries(tdclient PUBLIC mimalloc)
if (TD_ENABLE_JNI AND NOT ANDROID) # jni is available by default on Android if (TD_ENABLE_JNI AND NOT ANDROID) # jni is available by default on Android
target_include_directories(tdclient PUBLIC ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) target_include_directories(tdclient PUBLIC ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})