diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-08-13 16:28:23 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-08-13 17:27:30 -0400 |
commit | 183b097072015fe83c751904d8133fa105717a5b (patch) | |
tree | 7b5030712ec8bee902b2a852976012428b10cc26 /indra/cmake | |
parent | 2921deed78af5751b3788aa8d8e1297306b2abab (diff) |
Update tracy integration to 0.11 and rework client library to be configurable at build time
Also copy tracy profiler client next to windows binary when enabled
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/Tracy.cmake | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake index 32c02edb93..bd3c13b06a 100644 --- a/indra/cmake/Tracy.cmake +++ b/indra/cmake/Tracy.cmake @@ -4,14 +4,26 @@ include(Prebuilt) include_guard() add_library( ll::tracy INTERFACE IMPORTED ) -set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.") +option(USE_TRACY "Use Tracy profiler." OFF) if (USE_TRACY) + option(USE_TRACY_ON_DEMAND "Use Tracy profiler." ON) + option(USE_TRACY_LOCAL_ONLY "Use Tracy profiler." OFF) + use_system_binary(tracy) use_prebuilt_binary(tracy) target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy) - target_link_libraries( ll::tracy INTERFACE TracyClient ) + + target_compile_definitions(ll::tracy INTERFACE -DTRACY_ENABLE=1 -DTRACY_ONLY_IPV4=1) + + if (USE_TRACY_ON_DEMAND) + target_compile_definitions(ll::tracy INTERFACE -DTRACY_ON_DEMAND=1) + endif () + + if (USE_TRACY_LOCAL_ONLY) + target_compile_definitions(ll::tracy INTERFACE -DTRACY_NO_BROADCAST=1 -DTRACY_ONLY_LOCALHOST=1) + endif () # See: indra/llcommon/llprofiler.h add_compile_definitions(LL_PROFILER_CONFIGURATION=3) |