From 178f4205e203ab67b2576b9cb11dd4bf9a65cba5 Mon Sep 17 00:00:00 2001 From: Davis King Date: Tue, 26 Sep 2017 11:49:29 -0400 Subject: [PATCH] Made cmake error messages a little clearer --- dlib/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt index 7155a5f75..5c7c7fc0c 100644 --- a/dlib/CMakeLists.txt +++ b/dlib/CMakeLists.txt @@ -625,9 +625,11 @@ if (NOT TARGET dlib) set(DLIB_USE_CUDA OFF CACHE STRING ${DLIB_USE_BLAS_STR} FORCE ) toggle_preprocessor_switch(DLIB_USE_CUDA) if (COMPILER_CAN_DO_CPP_11) - if (NOT cudnn OR NOT cudnn_include OR NOT cudnn_test_compile_worked) - message(STATUS "*** cuDNN V5.0 OR GREATER NOT FOUND. DLIB WILL NOT USE CUDA. ***") - message(STATUS "*** If you have cuDNN then set CMAKE_PREFIX_PATH to include cuDNN's folder.") + if (cuda_test_compile_worked) + if (NOT cudnn OR NOT cudnn_include OR NOT cudnn_test_compile_worked) + message(STATUS "*** cuDNN V5.0 OR GREATER NOT FOUND. DLIB WILL NOT USE CUDA. ***") + message(STATUS "*** If you have cuDNN then set CMAKE_PREFIX_PATH to include cuDNN's folder.") + endif() endif() else () message(STATUS "*** Dlib CUDA support requires C++11 but your compiler doesn't support it. ***")