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})