fix FindCUDA CMake module:

do not unset variables if CUDA_TOOLKIT_TARGET_DIR is not defined
This commit is contained in:
Vladislav Vinogradov 2015-01-23 19:17:00 +03:00
parent 3f1fb281be
commit fa23a01775

View File

@ -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()