link gperftools in the top CMakeLists.txt

release/4.3a0
Varun Agrawal 2024-12-02 09:53:33 -05:00
parent 1091b9cd2d
commit 3980a439c0
2 changed files with 5 additions and 2 deletions

View File

@ -2,4 +2,3 @@
###############################################################################
# Find Google perftools
find_package(GooglePerfTools)
target_link_libraries(${PROJECT_NAME} ${GPERFTOOLS_TCMALLOC} ${GPERFTOOLS_PROFILER})

View File

@ -147,6 +147,10 @@ if (GTSAM_USE_EIGEN_MKL)
target_include_directories(gtsam PUBLIC ${MKL_INCLUDE_DIR})
endif()
if (GOOGLE_PERFTOOLS_FOUND)
target_link_libraries(gtsam PRIVATE ${GPERFTOOLS_TCMALLOC} ${GPERFTOOLS_PROFILER})
endif()
# Add includes for source directories 'BEFORE' boost and any system include
# paths so that the compiler uses GTSAM headers in our source directory instead
# of any previously installed GTSAM headers.