فهرست منبع

Disable the --host-compilation flag for CUDA >= 3.0 since it is derecated.

James Bigler 16 سال پیش
والد
کامیت
d3034f9b56
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      Modules/FindCUDA.cmake

+ 5 - 1
Modules/FindCUDA.cmake

@@ -813,7 +813,11 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
   if(CUDA_HOST_COMPILATION_CPP)
     set(CUDA_C_OR_CXX CXX)
   else(CUDA_HOST_COMPILATION_CPP)
-    set(nvcc_flags ${nvcc_flags} --host-compilation C)
+    if(CUDA_VERSION VERSION_LESS "3.0")
+      set(nvcc_flags ${nvcc_flags} --host-compilation C)
+    else()
+      message( "WARNING: --host-compilation flag is deprecated in CUDA version >= 3.0.  Removing --host-compilation C flag" )
+    endif()
     set(CUDA_C_OR_CXX C)
   endif(CUDA_HOST_COMPILATION_CPP)