You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "cmcfarlen (via GitHub)" <gi...@apache.org> on 2023/06/14 15:38:19 UTC

[GitHub] [trafficserver] cmcfarlen commented on a diff in pull request #9842: Search for and link profiler in CMake build

cmcfarlen commented on code in PR #9842:
URL: https://github.com/apache/trafficserver/pull/9842#discussion_r1229824333


##########
CMakeLists.txt:
##########
@@ -88,25 +88,36 @@ CHECK_INCLUDE_FILE(arpa/nameser_compat.h HAVE_ARPA_NAMESER_COMPAT_H)
 CHECK_INCLUDE_FILE(siginfo.h HAVE_SIGINFO_H)
 
 # Find libraries
-find_package(TSMallocReplacement QUIET MODULE)
-if(TSMallocReplacement_FOUND)
-    link_libraries(ts::TSMallocReplacement)
-endif()
 find_package(brotli)
 if(brotli_FOUND)
     set(HAVE_BROTLI_ENCODE_H TRUE)
 endif()
+
 find_package(hwloc)
 if(hwloc_FOUND)
     set(TS_USE_HWLOC TRUE)
 endif()
+
 find_package(LibLZMA)
 if(LibLZMA_FOUND)
         set(HAVE_LZMA_H TRUE)
 endif()
+
 find_package(PCRE)
+
 include(FindOpenSSL)
 find_package(OpenSSL)
+
+find_package(profiler)
+if(profiler_FOUND)
+    set(TS_HAS_PROFILER TRUE)
+endif()

Review Comment:
   We should add an option for looking for the profiler as we don't always want to profile.  The auto tools build has `--with-profiler` for this.



##########
CMakeLists.txt:
##########
@@ -88,25 +88,36 @@ CHECK_INCLUDE_FILE(arpa/nameser_compat.h HAVE_ARPA_NAMESER_COMPAT_H)
 CHECK_INCLUDE_FILE(siginfo.h HAVE_SIGINFO_H)
 
 # Find libraries
-find_package(TSMallocReplacement QUIET MODULE)
-if(TSMallocReplacement_FOUND)
-    link_libraries(ts::TSMallocReplacement)
-endif()
 find_package(brotli)
 if(brotli_FOUND)
     set(HAVE_BROTLI_ENCODE_H TRUE)
 endif()
+
 find_package(hwloc)
 if(hwloc_FOUND)
     set(TS_USE_HWLOC TRUE)
 endif()
+
 find_package(LibLZMA)
 if(LibLZMA_FOUND)
         set(HAVE_LZMA_H TRUE)
 endif()
+
 find_package(PCRE)
+
 include(FindOpenSSL)
 find_package(OpenSSL)
+
+find_package(profiler)
+if(profiler_FOUND)
+    set(TS_HAS_PROFILER TRUE)
+endif()

Review Comment:
   Maybe just `PROFILE` as an option and default to off.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org