From ccf8ab396042e1c8230b56459a01debfc8d874f8 Mon Sep 17 00:00:00 2001 From: David OK Date: Mon, 11 Dec 2023 15:03:06 +0000 Subject: [PATCH] MAINT: fix CMake script. --- cpp/examples/Shakti/TensorRT/CMakeLists.txt | 4 ++++ cpp/test/Shakti/Cuda/TensorRT/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cpp/examples/Shakti/TensorRT/CMakeLists.txt b/cpp/examples/Shakti/TensorRT/CMakeLists.txt index b59ba19b5..799c646c6 100644 --- a/cpp/examples/Shakti/TensorRT/CMakeLists.txt +++ b/cpp/examples/Shakti/TensorRT/CMakeLists.txt @@ -1,3 +1,7 @@ +if(NOT CMAKE_CUDA_COMPILER OR NOT TensorRT_FOUND) + return() +endif() + file(GLOB TRT_SOURCE_FILES FILES *.cpp) foreach(file ${TRT_SOURCE_FILES}) diff --git a/cpp/test/Shakti/Cuda/TensorRT/CMakeLists.txt b/cpp/test/Shakti/Cuda/TensorRT/CMakeLists.txt index 7931f2e5f..de2ba8dbe 100644 --- a/cpp/test/Shakti/Cuda/TensorRT/CMakeLists.txt +++ b/cpp/test/Shakti/Cuda/TensorRT/CMakeLists.txt @@ -1,3 +1,7 @@ +if(NOT CMAKE_CUDA_COMPILER OR NOT TensorRT_FOUND) + return() +endif() + file(GLOB test_tensorrt_SOURCE_FILES FILES test_*tensorrt*.cpp) foreach(file ${test_tensorrt_SOURCE_FILES})