# Autogenerated file, run tools/build/setup_cmake.py to regenerate if(NOT DEFINED TCMalloc_HeapProfiler_LIBRARIES) set(CHECK_COMPILES_BODY "HeapProfilerStart(\"profiler\");") check_compiles("_environment" TCMalloc_HeapProfiler TCMALLOC_HEAPPROFILER "#include " "" "" TCMalloc_HeapProfiler_ok) if("${TCMalloc_HeapProfiler_ok}" MATCHES "1") message(STATUS "Found TCMalloc_HeapProfiler in environment") else() include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules("TCMalloc_HeapProfiler_PKGCONF" "tcmalloc_heapprofiler") # Include dir find_path("TCMalloc_HeapProfiler_INCLUDE_DIR" NAMES gperftools/heap-profiler.h PATHS ${TCMalloc_HeapProfiler_PKGCONF_INCLUDE_DIRS} ) # Finally the library itself foreach(lib ) find_library("${lib}_LIBRARY" NAMES ${lib} PATHS ${TCMalloc_HeapProfiler_PKGCONF_LIBRARY_DIRS} ) set("TCMalloc_HeapProfiler_LIBRARY" ${TCMalloc_HeapProfiler_LIBRARY} ${${lib}_LIBRARY}) endforeach(lib) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(TCMalloc_HeapProfiler_PROCESS_INCLUDES TCMalloc_HeapProfiler_INCLUDE_DIR) set(TCMalloc_HeapProfiler_PROCESS_LIBS TCMalloc_HeapProfiler_LIBRARY) libfind_process(TCMalloc_HeapProfiler) if ("${TCMalloc_HeapProfiler_LIBRARY}" MATCHES ".*NOTFOUND.*" OR "${TCMalloc_HeapProfiler_INCLUDE_DIR}" MATCHES ".*NOTFOUND.*") message("TCMalloc_HeapProfiler not found") file(WRITE "${PROJECT_BINARY_DIR}/data/build_info/TCMalloc_HeapProfiler" "ok=False") else() check_compiles("_found" "TCMalloc_HeapProfiler" "TCMALLOC_HEAPPROFILER" "#include " "${TCMalloc_HeapProfiler_INCLUDE_DIR}" "${TCMalloc_HeapProfiler_LIBRARY}" TCMalloc_HeapProfiler_ok_ok) if(${TCMalloc_HeapProfiler_ok_ok} MATCHES "1") message(STATUS "Found TCMalloc_HeapProfiler at ""${TCMalloc_HeapProfiler_INCLUDE_DIR}" " " "${TCMalloc_HeapProfiler_LIBRARY}") else() message("TCMalloc_HeapProfiler not found") file(WRITE "${PROJECT_BINARY_DIR}/data/build_info/TCMalloc_HeapProfiler" "ok=False") endif() endif() endif() else() message(STATUS "TCMalloc_HeapProfiler already setup") endif(NOT DEFINED TCMalloc_HeapProfiler_LIBRARIES)