From fa23a01775019929baea649f9e616e00e5060242 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Fri, 23 Jan 2015 19:17:00 +0300 Subject: [PATCH] fix FindCUDA CMake module: do not unset variables if CUDA_TOOLKIT_TARGET_DIR is not defined --- cmake/FindCUDA.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindCUDA.cmake b/cmake/FindCUDA.cmake index ccfc4b93b3..f7502c7f27 100644 --- a/cmake/FindCUDA.cmake +++ b/cmake/FindCUDA.cmake @@ -538,7 +538,7 @@ if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}") endif() if(NOT "${CUDA_TARGET_TRIPLET}" STREQUAL "${CUDA_TARGET_TRIPLET_INTERNAL}" OR - NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}") + (DEFINED CUDA_TOOLKIT_TARGET_DIR AND NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}")) cuda_unset_include_and_libraries() endif()