Commit c633ad54 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Rename tcmalloc to gperftools in COOL cmake config (CORALCOOL-2872)


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@19929 4525493e-7705-40b1-a816-d608a930855b
parent d6062780
# - Locate gperftools
# Defines:
#
# GPERFTOOLS_FOUND
# GPERFTOOLS_INCLUDE_DIR
# GPERFTOOLS_INCLUDE_DIRS (not cached)
# GPERFTOOLS_tcmalloc_LIBRARY
# GPERFTOOLS_profiler_LIBRARY
# GPERFTOOLS_LIBRARIES (not cached)
# GPERFTOOLS_LIBRARY_DIRS (not cached)
# PPROF_EXECUTABLE
find_path(GPERFTOOLS_INCLUDE_DIR NAMES gperftools/tcmalloc.h)
foreach(component tcmalloc profiler)
find_library(GPERFTOOLS_${component}_LIBRARY NAMES ${component})
mark_as_advanced(GPERFTOOLS_${component}_LIBRARY)
endforeach()
find_program(PPROF_EXECUTABLE NAMES pprof
HINTS ${GPERFTOOLS_INCLUDE_DIR}/../bin)
set(GPERFTOOLS_INCLUDE_DIRS ${GPERFTOOLS_INCLUDE_DIR})
set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_tcmalloc_LIBRARY} ${GPERFTOOLS_profiler_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set GPERFTOOLS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(gperftools DEFAULT_MSG GPERFTOOLS_INCLUDE_DIR GPERFTOOLS_LIBRARIES)
mark_as_advanced(GPERFTOOLS_FOUND GPERFTOOLS_INCLUDE_DIR PPROF_EXECUTABLE)
if(GPERFTOOLS_tcmalloc_LIBRARY)
get_filename_component(GPERFTOOLS_LIBRARY_DIRS ${GPERFTOOLS_tcmalloc_LIBRARY} PATH)
elseif(GPERFTOOLS_profiler_LIBRARY)
get_filename_component(GPERFTOOLS_LIBRARY_DIRS ${GPERFTOOLS_profiler_LIBRARY} PATH)
endif()
if(PPROF_EXECUTABLE)
get_filename_component(GPERFTOOLS_BINARY_PATH ${PPROF_EXECUTABLE} PATH)
endif()
find_package(unwind)
set(GPERFTOOLS_ENVIRONMENT PACKAGE unwind)
# - Locate tcmalloc library
# Defines:
#
# TCMALLOC_FOUND
# TCMALLOC_INCLUDE_DIR
# TCMALLOC_INCLUDE_DIRS (not cached)
# TCMALLOC_tcmalloc_LIBRARY
# TCMALLOC_profiler_LIBRARY
# TCMALLOC_LIBRARIES (not cached)
# TCMALLOC_LIBRARY_DIRS (not cached)
# PPROF_EXECUTABLE
find_path(TCMALLOC_INCLUDE_DIR NAMES gperftools/tcmalloc.h google/tcmalloc.h)
foreach(component tcmalloc profiler)
find_library(TCMALLOC_${component}_LIBRARY NAMES ${component})
mark_as_advanced(TCMALLOC_${component}_LIBRARY)
endforeach()
find_program(PPROF_EXECUTABLE NAMES pprof
HINTS ${TCMALLOC_INCLUDE_DIR}/../bin)
set(TCMALLOC_INCLUDE_DIRS ${TCMALLOC_INCLUDE_DIR})
set(TCMALLOC_LIBRARIES ${TCMALLOC_tcmalloc_LIBRARY} ${TCMALLOC_profiler_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set TCMALLOC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(tcmalloc DEFAULT_MSG TCMALLOC_INCLUDE_DIR TCMALLOC_LIBRARIES)
mark_as_advanced(TCMALLOC_FOUND TCMALLOC_INCLUDE_DIR PPROF_EXECUTABLE)
if(TCMALLOC_tcmalloc_LIBRARY)
get_filename_component(TCMALLOC_LIBRARY_DIRS ${TCMALLOC_tcmalloc_LIBRARY} PATH)
elseif(TCMALLOC_profiler_LIBRARY)
get_filename_component(TCMALLOC_LIBRARY_DIRS ${TCMALLOC_profiler_LIBRARY} PATH)
endif()
if(PPROF_EXECUTABLE)
get_filename_component(TCMALLOC_BINARY_PATH ${PPROF_EXECUTABLE} PATH)
endif()
find_package(unwind)
set(TCMALLOC_ENVIRONMENT PACKAGE unwind)
......@@ -67,7 +67,7 @@ ENDIF()
coral_env_for_package(Valgrind)
coral_env_for_package(IgProf)
coral_env_for_package(tcmalloc)
coral_env_for_package(gperftools)
#----------------------------------------------------------------------------
# More specific test runtime for COOL
......
......@@ -34,7 +34,7 @@ use CppUnit v* LCG_Interfaces
use QMtest v* LCG_Interfaces
use valgrind v* LCG_Interfaces
use igprof v* LCG_Interfaces
use tcmalloc v* LCG_Interfaces
use tcmalloc v* LCG_Interfaces # Eventually gperftools (CORALCOOL-2872)
# Workaround for "failed to start tool 'memcheck'" relocatability issues
# See Rolf's message and also http://daveti.blog.com/2012/08/01/valgrind-dynamic-code-analysis-tool-part-v-valgrind-failed-to-start-tool-memcheck-for-platform
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment