From c00de92854fce0038bf5e5ac3b49bbf45784a77e Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Fri, 6 Dec 2024 11:32:34 -0500 Subject: [PATCH] use the switch --- gtsam/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index 9a4b6ac3a..87440d19f 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -147,7 +147,7 @@ if (GTSAM_USE_EIGEN_MKL) target_include_directories(gtsam PUBLIC ${MKL_INCLUDE_DIR}) endif() -if (GPERFTOOLS_FOUND) +if (GTSAM_ENABLE_GPERFTOOLS AND GPERFTOOLS_FOUND) target_link_libraries(gtsam PRIVATE ${GPERFTOOLS_TCMALLOC} ${GPERFTOOLS_PROFILER}) endif()