TFE 禁用 tcmalloc

This commit is contained in:
luwenpeng
2020-10-27 12:43:48 +08:00
parent 13d2607957
commit 99731ae689
2 changed files with 13 additions and 14 deletions

26
vendor/CMakeLists.txt vendored
View File

@@ -336,18 +336,18 @@ set_property(TARGET brotlienc-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${IN
target_link_libraries(brotlienc-static INTERFACE brotlicommon-static)
### gperftools
ExternalProject_Add(gperftools
PREFIX gperftools
URL ${CMAKE_CURRENT_SOURCE_DIR}/gperftools-2.8.tar.gz
URL_MD5 ea61ad1e886f53e4069873ce52cae7df
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/patch/gperftools-fix_too_small_heap_profile_buffer_size.patch
CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR> --disable-shared
BUILD_IN_SOURCE 1)
#ExternalProject_Add(gperftools
# PREFIX gperftools
# URL ${CMAKE_CURRENT_SOURCE_DIR}/gperftools-2.8.tar.gz
# URL_MD5 ea61ad1e886f53e4069873ce52cae7df
# PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/patch/gperftools-fix_too_small_heap_profile_buffer_size.patch
# CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR> --disable-shared
# BUILD_IN_SOURCE 1)
ExternalProject_Get_Property(gperftools INSTALL_DIR)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
#ExternalProject_Get_Property(gperftools INSTALL_DIR)
#file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
add_library(gperftools-static STATIC IMPORTED GLOBAL)
add_dependencies(gperftools-static gperftools)
set_property(TARGET gperftools-static PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/libtcmalloc.a)
set_property(TARGET gperftools-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
#add_library(gperftools-static STATIC IMPORTED GLOBAL)
#add_dependencies(gperftools-static gperftools)
#set_property(TARGET gperftools-static PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/libtcmalloc.a)
#set_property(TARGET gperftools-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)