From 7e2f86461a00cfe4951366ca0f6aea9f74ff4f17 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sat, 6 Jun 2020 17:38:08 +0300 Subject: FindCUDAToolkit: Fix cudart not found status message This ended up after the searching after commit dc2eae1 (FindCUDAToolkit: Factor out discovery code into a separate file, 2020-04-22). Move it back to where it was and should be. --- Modules/FindCUDAToolkit.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index b28892e..7d4e168 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -498,10 +498,6 @@ else() unset(NVCC_OUT) endif() -if(NOT CUDA_CUDART AND NOT CUDAToolkit_FIND_QUIETLY) - message(STATUS "Unable to find cudart library.") -endif() - # Find the CUDA Runtime Library libcudart find_library(CUDA_CUDART NAMES cudart @@ -514,6 +510,10 @@ if(NOT CUDA_CUDART) ) endif() +if(NOT CUDA_CUDART AND NOT CUDAToolkit_FIND_QUIETLY) + message(STATUS "Unable to find cudart library.") +endif() + unset(CUDAToolkit_ROOT_DIR) if(_CUDAToolkit_Pop_Prefix) list(REMOVE_AT CMAKE_PREFIX_PATH -1) -- cgit v0.12