Skip to content

Commit

Permalink
chore(build): add needed includes for linking with tensorrt dd
Browse files Browse the repository at this point in the history
  • Loading branch information
Bycob authored and mergify[bot] committed Jun 9, 2021
1 parent 7bb9705 commit a0da6f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ if (USE_TORCH)
"-DCMAKE_CXX_FLAGS=-isystem ${CMAKE_BINARY_DIR}/pytorch/src/pytorch/ -isystem ${SPDLOG_INCLUDE_DIR} -isystem ${PROTOBUF_INCLUDE_DIR}"
"-DCMAKE_CUDA_FLAGS=-isystem ${CMAKE_BINARY_DIR}/pytorch/src/pytorch/ -isystem ${SPDLOG_INCLUDE_DIR} -isystem ${PROTOBUF_INCLUDE_DIR}"
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
BUILD_COMMAND ""
DEPENDS protobuf pytorch
)

Expand Down Expand Up @@ -973,7 +974,7 @@ if (USE_TENSORRT)
)

# Use our tensorrt-oss header versions first
include_directories(SYSTEM ${CMAKE_BINARY_DIR}/tensorrt-oss/src/tensorrt-oss/include)
list(INSERT TENSORRT_INC_DIR 0 ${CMAKE_BINARY_DIR}/tensorrt-oss/src/tensorrt-oss/include)
endif()

if (USE_HTTP_SERVER_OATPP)
Expand Down Expand Up @@ -1076,9 +1077,11 @@ include_directories(
${XGBOOST_INC_DIR}
${TSNE_INC_DIR}
${TORCH_INC_DIR}
${TENSORRT_INC_DIR}
${NCNN_INC_DIR}
)
include_directories(
SYSTEM ${TENSORRT_INC_DIR}
)
include_directories(
${CMAKE_SOURCE_DIR}/src/backends/caffe
${CMAKE_SOURCE_DIR}/backends/xgb
Expand Down

0 comments on commit a0da6f7

Please sign in to comment.