summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMark Abraham <mark.j.abraham@gmail.com>2015-01-04 13:37:51 (GMT)
committerBrad King <brad.king@kitware.com>2015-01-08 19:39:16 (GMT)
commitd5846eb153e277980f59f70c92807851a429c3c1 (patch)
tree851a9d38c171bf22572a889db5d3eb7b54734d41 /Modules
parent62b19984039235d5325ee1ad6a7643a4ccd696a8 (diff)
downloadCMake-d5846eb153e277980f59f70c92807851a429c3c1.zip
CMake-d5846eb153e277980f59f70c92807851a429c3c1.tar.gz
CMake-d5846eb153e277980f59f70c92807851a429c3c1.tar.bz2
FindCUDA: Do not assume CMAKE_SYSTEM_PROCESSOR is set
CMAKE_SYSTEM_PROCESSOR is not guaranteed to be defined (per http://www.cmake.org/Wiki/CMake_Cross_Compiling), and when cross compiling where it happens to be undefined, this module was broken. Reviewed-by: Rolf Eike Beer <eike@sf-mail.de>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 29bb875..ecfc781 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -613,7 +613,7 @@ endif()
set(CUDA_VERSION_STRING "${CUDA_VERSION}")
# Support for arm cross compilation with CUDA 5.5
-if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
+if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf" CACHE PATH "Toolkit target location.")
else()
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "Toolkit target location.")
@@ -621,7 +621,7 @@ endif()
mark_as_advanced(CUDA_TOOLKIT_TARGET_DIR)
# Target CPU architecture
-if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
+if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
set(_cuda_target_cpu_arch_initial "ARM")
else()
set(_cuda_target_cpu_arch_initial "")