ENABLE_LIBTCMALLOC -> ENABLE_TCMALLOC (#1558)

* Cmake: clang + libc++ fixes

* Cmake: fix link of some tests (missing pthread)

* Use -pthread flag for compile

* ENABLE_LIBTCMALLOC -> ENABLE_TCMALLOC
This commit is contained in:
proller 2017-11-28 22:57:15 +03:00 committed by alexey-milovidov
parent 2ab73565b2
commit 34eef961de
3 changed files with 7 additions and 7 deletions

View File

@ -64,7 +64,7 @@ if (USE_INTERNAL_CCTZ_LIBRARY)
add_subdirectory (cctz-cmake) add_subdirectory (cctz-cmake)
endif () endif ()
if (ENABLE_LIBTCMALLOC AND USE_INTERNAL_GPERFTOOLS_LIBRARY) if (ENABLE_TCMALLOC AND USE_INTERNAL_GPERFTOOLS_LIBRARY)
add_subdirectory (libtcmalloc) add_subdirectory (libtcmalloc)
endif () endif ()

View File

@ -66,7 +66,7 @@ if (USE_JEMALLOC)
message (STATUS "Link jemalloc : ${JEMALLOC_LIBRARIES}") message (STATUS "Link jemalloc : ${JEMALLOC_LIBRARIES}")
set (MALLOC_LIBRARIES ${JEMALLOC_LIBRARIES}) set (MALLOC_LIBRARIES ${JEMALLOC_LIBRARIES})
elseif (USE_TCMALLOC) elseif (USE_TCMALLOC)
if (DEBUG_LIBTCMALLOC) if (DEBUG_TCMALLOC)
message (STATUS "Link libtcmalloc_minimal_debug for testing: ${GPERFTOOLS_TCMALLOC_MINIMAL_DEBUG}") message (STATUS "Link libtcmalloc_minimal_debug for testing: ${GPERFTOOLS_TCMALLOC_MINIMAL_DEBUG}")
set (MALLOC_LIBRARIES ${GPERFTOOLS_TCMALLOC_MINIMAL_DEBUG}) set (MALLOC_LIBRARIES ${GPERFTOOLS_TCMALLOC_MINIMAL_DEBUG})
else () else ()

View File

@ -5,16 +5,16 @@ else ()
endif () endif ()
if (CMAKE_SYSTEM MATCHES "FreeBSD") if (CMAKE_SYSTEM MATCHES "FreeBSD")
option (ENABLE_LIBTCMALLOC "Set to TRUE to enable libtcmalloc" OFF) option (ENABLE_TCMALLOC "Set to TRUE to enable tcmalloc" OFF)
else () else ()
option (ENABLE_LIBTCMALLOC "Set to TRUE to enable libtcmalloc" ON) option (ENABLE_TCMALLOC "Set to TRUE to enable tcmalloc" ON)
endif () endif ()
option (DEBUG_LIBTCMALLOC "Set to TRUE to use debug version of libtcmalloc" OFF) option (DEBUG_TCMALLOC "Set to TRUE to use debug version of libtcmalloc" OFF)
if (ENABLE_LIBTCMALLOC) if (ENABLE_TCMALLOC)
#contrib/libtcmalloc doesnt build debug version, try find in system #contrib/libtcmalloc doesnt build debug version, try find in system
if (DEBUG_LIBTCMALLOC OR NOT USE_INTERNAL_GPERFTOOLS_LIBRARY) if (DEBUG_TCMALLOC OR NOT USE_INTERNAL_GPERFTOOLS_LIBRARY)
find_package (Gperftools) find_package (Gperftools)
endif () endif ()