Skip to content

Commit 7fd1c05

Browse files
committed
build(cmake): make profiler/tracy fetch entirely opt-in
1 parent 1ae30d3 commit 7fd1c05

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cmake/modules/ProjectConfig.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ option(UE4SS_SUPPRESS_THIRD_PARTY_WARNINGS "Suppress warnings from third-party l
1919
option(UE4SS_VERSION_CHECK "Enable compiler version checking" ON)
2020

2121
# Profiler configuration
22-
set(RC_PROFILER_FLAVOR "Tracy" CACHE STRING "Select profiler: Tracy, Superluminal, or None")
22+
# Default to None - users can opt-in to Tracy or Superluminal if needed
23+
set(RC_PROFILER_FLAVOR "None" CACHE STRING "Select profiler: Tracy, Superluminal, or None")
2324
set_property(CACHE RC_PROFILER_FLAVOR PROPERTY STRINGS Tracy Superluminal None)
2425

2526
# Proxy configuration

deps/first/Profiler/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ project(${TARGET})
88
message("Project: ${TARGET} (HEADER-ONLY)")
99

1010
set(ProfilerFlavors Tracy Superluminal None)
11-
set(RC_PROFILER_FLAVOR Tracy CACHE STRING "Profiler flavor (Tracy, Superluminal, or None)")
11+
# Default to None - users can opt-in to Tracy or Superluminal if needed
12+
# This is also set in ProjectConfig.cmake - whichever is evaluated last takes precedence
13+
set(RC_PROFILER_FLAVOR "None" CACHE STRING "Profiler flavor (Tracy, Superluminal, or None)")
1214
set_property(CACHE RC_PROFILER_FLAVOR PROPERTY STRINGS ${ProfilerFlavors})
1315

1416
add_library(${TARGET} INTERFACE)
@@ -23,8 +25,10 @@ target_include_directories(${TARGET} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/inclu
2325
make_headers_visible(${TARGET} "${CMAKE_CURRENT_SOURCE_DIR}/include")
2426

2527
if (${RC_PROFILER_FLAVOR} STREQUAL None)
28+
message(STATUS "Profiler: Disabled (set RC_PROFILER_FLAVOR=Tracy to enable)")
2629
target_compile_definitions(${TARGET} INTERFACE DISABLE_PROFILER IS_TRACY=0 IS_SUPERLUMINAL=0)
2730
elseif (${RC_PROFILER_FLAVOR} STREQUAL Tracy)
31+
message(STATUS "Profiler: Tracy (fetching from GitHub)")
2832
# Tracy start
2933
FetchContent_Declare(Tracy
3034
GIT_REPOSITORY [email protected]:wolfpld/tracy.git
@@ -37,6 +41,7 @@ elseif (${RC_PROFILER_FLAVOR} STREQUAL Tracy)
3741
target_compile_definitions(${TARGET} INTERFACE IS_TRACY=1 IS_SUPERLUMINAL=0)
3842
target_link_libraries(${TARGET} INTERFACE TracyClient)
3943
elseif (${RC_PROFILER_FLAVOR} STREQUAL Superluminal)
44+
message(STATUS "Profiler: Superluminal")
4045
find_package(SuperluminalAPI REQUIRED)
4146

4247
target_compile_definitions(${TARGET} INTERFACE IS_TRACY=0 IS_SUPERLUMINAL=1)

0 commit comments

Comments
 (0)