fixed CC arch/pts for android (used sm_32)
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Wed, 30 Oct 2013 06:21:13 +0000 (10:21 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Thu, 28 Nov 2013 06:00:47 +0000 (10:00 +0400)
cmake/OpenCVDetectCUDA.cmake

index 156d90e..0b61f14 100644 (file)
@@ -90,12 +90,17 @@ if(CUDA_FOUND)
   endif()
 
   if(NOT DEFINED __cuda_arch_bin)
-    if(${CUDA_VERSION} VERSION_LESS "5.0")
-      set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
+    if(ANDROID)
+      set(__cuda_arch_bin "3.2")
+      set(__cuda_arch_ptx "")
     else()
-      set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
+      if(${CUDA_VERSION} VERSION_LESS "5.0")
+        set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
+      else()
+        set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
+      endif()
+      set(__cuda_arch_ptx "3.0")
     endif()
-    set(__cuda_arch_ptx "3.0")
   endif()
 
   set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")