mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Add self-profiling option.
This commit is contained in:
parent
abf12f79c5
commit
8d67c79431
@ -5,6 +5,7 @@ option(GTK_FILESELECTOR "Use the GTK file selector on Linux instead of the xdg-p
|
||||
option(LEGACY "Instead of Wayland, use the legacy X11 backend on Linux" OFF)
|
||||
option(NO_ISA_EXTENSIONS "Disable ISA extensions (don't pass -march=native or -mcpu=native to the compiler)" OFF)
|
||||
option(NO_STATISTICS "Disable calculation of statistics" OFF)
|
||||
option(SELF_PROFILE "Enable self-profiling" OFF)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake)
|
||||
|
||||
@ -147,6 +148,15 @@ endif()
|
||||
include_directories(${INCLUDES})
|
||||
link_libraries(${LIBS})
|
||||
|
||||
if(SELF_PROFILE)
|
||||
add_definitions(-DTRACY_ENABLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -fno-omit-frame-pointer")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer")
|
||||
set(PROFILER_FILES ${PROFILER_FILES}
|
||||
../public/TracyClient.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PROFILER_FILES ${PROFILER_FILES}
|
||||
win32/Tracy.manifest
|
||||
|
Loading…
x
Reference in New Issue
Block a user