From bf7f263401e734868e6a9402641c1d8401a9bc28 Mon Sep 17 00:00:00 2001 From: Felix F Xu Date: Thu, 2 Nov 2023 07:39:05 +0800 Subject: [PATCH] Fix cmake find trtexec bin --- common/trtexec_vendor/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/trtexec_vendor/CMakeLists.txt b/common/trtexec_vendor/CMakeLists.txt index 0e5eebc621e39..86c713a4ff6de 100644 --- a/common/trtexec_vendor/CMakeLists.txt +++ b/common/trtexec_vendor/CMakeLists.txt @@ -28,7 +28,8 @@ if(TENSORRT_VERSION VERSION_LESS 8.2.1) endif() set(TRTEXEC_DEFAULT_BIN /usr/src/tensorrt/bin/trtexec) -if(NOT EXISTS TRTEXEC_DEFAULT_BIN) +if(NOT EXISTS ${TRTEXEC_DEFAULT_BIN}) + message(STATUS "${TRTEXEC_DEFAULT_BIN} not found, download and build from source...") include(FetchContent) fetchcontent_declare(tensorrt GIT_REPOSITORY https://github.com/NVIDIA/TensorRT @@ -71,6 +72,8 @@ if(NOT EXISTS TRTEXEC_DEFAULT_BIN) LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) +else() + message(STATUS "Found trtexec: ${TRTEXEC_DEFAULT_BIN}") endif() if(BUILD_TESTING)