mirror of
https://github.com/wolfpld/tracy.git
synced 2026-01-18 17:11:26 +01:00
Make rocprof optional
This commit is contained in:
@@ -33,7 +33,7 @@ else()
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(rocprofiler-sdk REQUIRED PATHS "/opt/rocm/lib/cmake")
|
||||
find_package(rocprofiler-sdk PATHS "/opt/rocm/lib/cmake")
|
||||
|
||||
set(TRACY_PUBLIC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/public)
|
||||
|
||||
@@ -56,8 +56,11 @@ target_link_libraries(
|
||||
PUBLIC
|
||||
Threads::Threads
|
||||
${CMAKE_DL_LIBS}
|
||||
rocprofiler-sdk::rocprofiler-sdk
|
||||
)
|
||||
if(rocprofiler-sdk_FOUND)
|
||||
target_compile_definitions(TracyClient PUBLIC TRACY_ROCPROF)
|
||||
target_link_libraries(TracyClient PUBLIC rocprofiler-sdk::rocprofiler-sdk)
|
||||
endif()
|
||||
|
||||
if(TRACY_Fortran)
|
||||
add_library(TracyClientF90 ${TRACY_VISIBILITY} "${TRACY_PUBLIC_DIR}/TracyClient.F90")
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
#include "client/TracyAlloc.cpp"
|
||||
#include "client/TracyOverride.cpp"
|
||||
#include "client/TracyKCore.cpp"
|
||||
|
||||
#ifdef TRACY_ROCPROF
|
||||
#include "client/TracyRocprof.cpp"
|
||||
#endif
|
||||
|
||||
#if defined(TRACY_HAS_CALLSTACK)
|
||||
# if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
|
||||
|
||||
Reference in New Issue
Block a user