Files
tracy/cmake/util.cmake
Bartosz Taudul ebf5ebd9bd Replace the output file safely in tracy-capture.
The old pre-flight truncated the output at startup with -f, so an
interrupted capture lost the trace, and the probe fopen followed a
symlink. The existing file is now moved to FILE~ for the duration of
the capture and restored if the trace cannot be written.
2026-09-06 01:07:45 +02:00

11 lines
304 B
CMake

set(TRACY_UTIL_DIR ${CMAKE_CURRENT_LIST_DIR}/../util)
set(TRACY_UTIL_SOURCES
CaptureFileBackup.cpp
)
list(TRANSFORM TRACY_UTIL_SOURCES PREPEND "${TRACY_UTIL_DIR}/")
add_library(TracyUtil STATIC EXCLUDE_FROM_ALL ${TRACY_UTIL_SOURCES})
target_include_directories(TracyUtil PUBLIC ${TRACY_UTIL_DIR})