[Cmake-commits] [cmake-commits] bigler committed run_nvcc.cmake 1.6 1.7

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Nov 30 17:05:20 EST 2009


Update of /cvsroot/CMake/CMake/Modules/FindCUDA
In directory public:/mounts/ram/cvs-serv23278

Modified Files:
	run_nvcc.cmake 
Log Message:
Don't allow -G -M on CUDA versions less than 3.0.


Index: run_nvcc.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindCUDA/run_nvcc.cmake,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** run_nvcc.cmake	7 Oct 2009 02:52:52 -0000	1.6
--- run_nvcc.cmake	30 Nov 2009 22:05:18 -0000	1.7
***************
*** 151,154 ****
--- 151,168 ----
    )
  
+ # For CUDA 2.3 and below, -G -M doesn't work, so remove the -G flag
+ # for dependency generation and hope for the best.
+ set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}")
+ set(CUDA_VERSION @CUDA_VERSION@)
+ if(CUDA_VERSION VERSION_LESS "3.0")
+   cmake_policy(PUSH)
+   # CMake policy 0007 NEW states that empty list elements are not
+   # ignored.  I'm just setting it to avoid the warning that's printed.
+   cmake_policy(SET CMP0007 NEW)
+   # Note that this will remove all occurances of -G.
+   list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G")
+   cmake_policy(POP)
+ endif()
+ 
  # Generate the dependency file
  cuda_execute_process(
***************
*** 156,160 ****
    COMMAND "${CUDA_NVCC_EXECUTABLE}"
    "${source_file}"
!   ${CUDA_NVCC_FLAGS}
    ${nvcc_flags}
    ${CCBIN}
--- 170,174 ----
    COMMAND "${CUDA_NVCC_EXECUTABLE}"
    "${source_file}"
!   ${depends_CUDA_NVCC_FLAGS}
    ${nvcc_flags}
    ${CCBIN}



More information about the Cmake-commits mailing list