1
0
Fork 0

Debug: Support frame tracing via Tracy

Use CMake FetchContent to pull tracy sources and build it if frame tracing is enabled.
As frame tracing requires annotations in the code, create a wrapper that replaces them
with our own defines that are empty when tracing is not enabled.
This commit is contained in:
trotFunky 2024-02-05 13:55:27 +00:00
parent 8199fd3449
commit 7241ed7321
4 changed files with 50 additions and 0 deletions

View file

@ -27,6 +27,22 @@ else ()
ImGui-SFML::ImGui-SFML)
endif()
if(TRACE_FRAMES)
message("Building with Tracy")
add_compile_definitions(TRACE_FRAMES)
include(FetchContent)
FetchContent_Declare(
Tracy
GIT_REPOSITORY https://github.com/wolfpld/tracy.git
GIT_TAG d46ffb4e9f132fc95bdd7d04207d8d669a9d4100
)
FetchContent_MakeAvailable(Tracy)
set(LIBS ${LIBS}
TracyClient)
endif()
add_compile_options(-Wall -Wextra)
add_executable(raycasting