Closed ahoarau closed 3 months ago
I figured out the bug:
TRACY_ENABLE
is ON by default and exports it as a PUBLIC
definition. In my build, I need it be be disabled by default, and activate it wrt to other cmake options.
It seems that in RelWithDebInfo
, this option is required to compile.
@wolfpld What do you think the correct fix should be ? Making TRACY_ENABLE
private ?
I can't advise you on build system configuration.
I got a workaround by simply not using the embedded CMake, and doing it manually:
find_package(Threads REQUIRED)
add_library(tracy STATIC ${tracy_SOURCE_DIR}/public/TracyClient.cpp)
target_include_directories(tracy PUBLIC ${tracy_SOURCE_DIR}/public)
target_link_libraries(tracy PUBLIC Threads::Threads)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_definitions(tracy PUBLIC TRACY_ENABLE) # this enables the tracy profiler
endif()
target_compile_definitions(tracy PUBLIC TRACY_ON_DEMAND TRACY_NO_CALLSTACK)
Hi, Congrats on the impressive tool. I'm trying to integrate it, but I'm facing some link errors on
RelWithDebInfo
. Everything is working fine inDebug
.I build everything in c++20, linking with
TracyClient
.