mirror of
https://github.com/apache/impala.git
synced 2026-01-03 06:00:52 -05:00
Switches the gperftools version from 2.0 to 2.5 which is also updated in the native-toolchain. The unmodified source is also checked into thirdparty for those not using the toolchain. This commit reverts "CDH-38434: Fix Impala packaging build" (commit 5666ef84977c4b92dec5b10ed71bbe36740a50c7) now that the toolchain dependencies have been built for sles12. Change-Id: I3fdc5091dfa4557968bf1a40f7e6d3eab91e7c15 Reviewed-on: http://gerrit.cloudera.org:8080/2581 Reviewed-by: Dan Hecht <dhecht@cloudera.com> Tested-by: Internal Jenkins
53 lines
1.6 KiB
CMake
53 lines
1.6 KiB
CMake
# - Find pprof (libprofiler.a)
|
|
# PPROF_ROOT hints the location
|
|
#
|
|
# This module defines
|
|
# PPROF_INCLUDE_DIR, directory containing headers
|
|
# PPROF_LIBS, directory containing pprof libraries
|
|
# PPROF_STATIC_LIB, path to libprofiler.a
|
|
# tcmallocstatic, pprofstatic
|
|
|
|
set(PPROF_SEARCH_HEADER_PATHS
|
|
${GPERFTOOLS_ROOT}/include
|
|
$ENV{IMPALA_HOME}/thirdparty/gperftools-$ENV{IMPALA_GPERFTOOLS_VERSION}/src
|
|
)
|
|
|
|
set(PPROF_SEARCH_LIB_PATH
|
|
${GPERFTOOLS_ROOT}/lib
|
|
$ENV{IMPALA_HOME}/thirdparty/gperftools-$ENV{IMPALA_GPERFTOOLS_VERSION}/.libs
|
|
)
|
|
|
|
find_path(PPROF_INCLUDE_DIR google/profiler.h PATHS
|
|
${PPROF_SEARCH_HEADER_PATHS}
|
|
# make sure we don't accidentally pick up a different version
|
|
NO_DEFAULT_PATH
|
|
)
|
|
|
|
find_library(PPROF_LIB_PATH profiler
|
|
PATHS ${PPROF_SEARCH_LIB_PATH} NO_DEFAULT_PATH)
|
|
find_library(PPROF_STATIC_LIB libprofiler.a
|
|
PATHS ${PPROF_SEARCH_LIB_PATH} NO_DEFAULT_PATH)
|
|
find_library(HEAPPROF_STATIC_LIB libtcmalloc.a
|
|
PATHS ${PPROF_SEARCH_LIB_PATH} NO_DEFAULT_PATH)
|
|
|
|
if (NOT PPROF_LIB_PATH OR NOT PPROF_STATIC_LIB OR
|
|
NOT HEAPPROF_STATIC_LIB)
|
|
message(FATAL_ERROR "gperftools libraries NOT found. "
|
|
"Looked for libs in ${PPROF_SEARCH_LIB_PATH}")
|
|
set(PPROF_FOUND FALSE)
|
|
else()
|
|
set(PPROF_FOUND TRUE)
|
|
add_library(pprofstatic STATIC IMPORTED)
|
|
set_target_properties(pprofstatic PROPERTIES IMPORTED_LOCATION "${PPROF_STATIC_LIB}")
|
|
add_library(tcmallocstatic STATIC IMPORTED)
|
|
set_target_properties(tcmallocstatic PROPERTIES IMPORTED_LOCATION "${HEAPPROF_STATIC_LIB}")
|
|
endif ()
|
|
|
|
mark_as_advanced(
|
|
PPROF_INCLUDE_DIR
|
|
PPROF_LIBS
|
|
PPROF_STATIC_LIB
|
|
pprofstatic
|
|
tcmallocstatic
|
|
)
|