Add json third party when support node trace db (#670)
Type: Code Improvement
This commit is contained in:
parent
feaf06365b
commit
4f4f6cd6dc
|
|
@ -17,6 +17,7 @@ option(TIM_VX_ENABLE_GRPC "Enable gPRC support"
|
|||
option(TIM_VX_DBG_ENABLE_TENSOR_HNDL "Enable built-in tensor from handle: use malloced memory instead of VideoMemory by kernel driver" ON)
|
||||
option(TIM_VX_ENABLE_TENSOR_CACHE "Enable tensor cache for const tensor" OFF)
|
||||
option(TIM_VX_ENABLE_API_TRACE "Enable trace and replay of graph apis" OFF)
|
||||
option(TIM_VX_ENABLE_NODE_TRACE "Enable node trace support" OFF)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
|
|
|||
|
|
@ -246,4 +246,21 @@ if(TIM_VX_ENABLE_TEST)
|
|||
install(TARGETS unit_test DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
if(TIM_VX_ENABLE_NODE_TRACE)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
jsoncpp
|
||||
GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp.git
|
||||
GIT_TAG master
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(jsoncpp)
|
||||
if(NOT jsoncpp_POPULATED)
|
||||
FetchContent_Populate(jsoncpp)
|
||||
add_subdirectory(${jsoncpp_SOURCE_DIR} ${jsoncpp_BINARY_DIR})
|
||||
endif()
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC ${jsoncpp_BINARY_DIR}/src/lib_json/libjsoncpp.so)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${jsoncpp_SOURCE_DIR}/include)
|
||||
endif()
|
||||
|
||||
add_subdirectory("utils")
|
||||
|
|
|
|||
Loading…
Reference in New Issue