Skip to content

Commit

Permalink
Build with Tracy if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ymd-stella committed Aug 10, 2024
1 parent 9463c40 commit 4be17ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ find_dependency(yaml-cpp)
if(@spdlog_FOUND@)
find_dependency(spdlog)
endif()
if(@Tracy_FOUND@)
find_dependency(Tracy)
endif()

if(@BOW_FRAMEWORK@ MATCHES "DBoW2")
find_dependency(DBoW2)
Expand Down
14 changes: 14 additions & 0 deletions src/stella_vslam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,20 @@ else()
message(STATUS "Determinism: DISABLED")
endif()

# Tracy
set(USE_TRACY OFF CACHE BOOL "Enable tracy")
if(USE_TRACY)
message(STATUS "tracy: ENABLED")
# Gperftools
find_package(Tracy REQUIRED)
else()
message(STATUS "tracy: DISABLED")
endif()
if(USE_TRACY)
target_compile_definitions(${PROJECT_NAME} PRIVATE -DTRACY_ENABLE=1)
target_link_libraries(${PROJECT_NAME} PRIVATE Tracy::TracyClient)
endif()

# ----- Configure stella_vslam library -----

# Include directories
Expand Down

0 comments on commit 4be17ea

Please sign in to comment.