Skip to content

Commit

Permalink
Fix tracy enable/disable from the PROFILE option.
Browse files Browse the repository at this point in the history
  • Loading branch information
lPrimemaster committed Jan 1, 2025
1 parent bb0aa21 commit 377e236
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ if (NOT sqlite3_POPULATED)
FetchContent_Populate(sqlite3)
endif()

if(PROFILE)
set(TRACY_ENABLE ON CACHE BOOL "Enable Tracy" FORCE)
else()
set(TRACY_ENABLE OFF CACHE BOOL "Enable Tracy" FORCE)
endif()

# Tracy Profiler
FetchContent_Declare(
tracy
Expand All @@ -61,9 +67,6 @@ set(RPC_CALL_KEYWORD "MX_RPC_METHOD")
add_definitions(-D${RPC_CALL_KEYWORD}=)
set(RPC_SPEC_FILE rpcspec.inl)

if(PROFILE)
add_definitions(-DTRACY_ENABLE)
endif()

# Make sure tracy profiler is installed/linked system wide
link_libraries(TracyClient)
Expand Down

0 comments on commit 377e236

Please sign in to comment.