File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ find_package(Occ)
7474find_package (BookkeepingApiCpp)
7575find_package (ZMQ)
7676find_package (MySQL)
77+ #find_package(gperftools)
7778
7879# extract include directories from targets
7980get_target_property (InfoLogger_INCLUDE_DIRS AliceO2::InfoLogger INTERFACE_INCLUDE_DIRECTORIES )
@@ -141,8 +142,14 @@ else ()
141142 message (STATUS "MySQL not found, corresponding features will be disabled." )
142143endif ()
143144
145+ # check Gperftools
146+ if (${gperftools_FOUND} )
147+ message (STATUS "gperftools enabled" )
148+ endif ()
149+
150+
144151# add flags to enable optional features in Readout, based on available dependencies
145- add_compile_definitions ($<$<BOOL :${Numa_FOUND} >:WITH_NUMA> $<$<BOOL :${RDMA_FOUND} >:WITH_RDMA> $<$<BOOL :${Configuration_FOUND} >:WITH_CONFIG> $<$<BOOL :${FairMQ_FOUND} >:WITH_FAIRMQ> $<$<BOOL :${Occ_FOUND} >:WITH_OCC> $<$<BOOL :${BookkeepingApiCpp_FOUND} >:WITH_LOGBOOK> $<$<BOOL :${ZMQ_FOUND} >:WITH_ZMQ> $<$<BOOL :${MYSQL_FOUND} >:WITH_DB> $<$<BOOL :${ReadoutCard_FOUND} >:WITH_READOUTCARD> )
152+ add_compile_definitions ($<$<BOOL :${Numa_FOUND} >:WITH_NUMA> $<$<BOOL :${RDMA_FOUND} >:WITH_RDMA> $<$<BOOL :${Configuration_FOUND} >:WITH_CONFIG> $<$<BOOL :${FairMQ_FOUND} >:WITH_FAIRMQ> $<$<BOOL :${Occ_FOUND} >:WITH_OCC> $<$<BOOL :${BookkeepingApiCpp_FOUND} >:WITH_LOGBOOK> $<$<BOOL :${ZMQ_FOUND} >:WITH_ZMQ> $<$<BOOL :${MYSQL_FOUND} >:WITH_DB> $<$<BOOL :${ReadoutCard_FOUND} >:WITH_READOUTCARD> $<$< BOOL : ${gperftools_FOUND} >:WITH_GPERFTOOLS> )
146153
147154# define include directories
148155set (READOUT_INCLUDE_DIRS
@@ -182,6 +189,9 @@ if(MYSQL_FOUND)
182189 list (APPEND READOUT_INCLUDE_DIRS ${MYSQL_INCLUDE_DIRS} )
183190 list (APPEND READOUT_LINK_LIBRARIES ${MYSQL_LIBRARIES} )
184191endif ()
192+ if (gperftools_FOUND)
193+ list (APPEND READOUT_LINK_LIBRARIES ${gperftools_LIBRARIES} )
194+ endif ()
185195
186196# some systems don't need an explicit library to have dlopen()
187197if (CMAKE_DL_LIBS )
Original file line number Diff line number Diff line change 1+ # Try to find the gperftools package include dirs and libraries
2+ # Author: Sylvain Chapeland
3+ #
4+ # This script will set the following variables:
5+ # gperftools_FOUND - System has gperftools
6+ # gperftools_INCLUDE_DIRS - The gperftools include directories
7+ # gperftools_LIBRARIES - The libraries needed to use gperftools
8+ #
9+ # This script can use the following variables:
10+ # gperftools_ROOT - Installation root to tell this module where to look.
11+
12+
13+ find_path (
14+ gperftools_INCLUDE_DIRS NAMES gperftools/profiler.h
15+ PATHS ${gperftools_ROOT} ${gperftools_ROOT} /include )
16+
17+ find_library (
18+ gperftools_LIBRARIES NAMES profiler tcmalloc
19+ PATHS ${gperftools_ROOT} ${gperftools_ROOT} /lib)
20+
21+ include (FindPackageHandleStandardArgs)
22+ find_package_handle_standard_args(
23+ gperftools DEFAULT_MSG gperftools_INCLUDE_DIRS gperftools_LIBRARIES)
24+
25+ if (${gperftools_FOUND} )
26+ message (
27+ STATUS
28+ "Found gperftools (include: ${gperftools_INCLUDE_DIRS} library: ${gperftools_LIBRARIES} )" )
29+ endif ()
30+
31+ mark_as_advanced (gperftools_INCLUDE_DIRS gperftools_LIBRARIES)
You can’t perform that action at this time.
0 commit comments