[Cmake-commits] [cmake-commits] king committed run_nvcc.cmake 1.2.2.2 1.2.2.3

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jan 28 16:47:45 EST 2010


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

Modified Files:
      Tag: CMake-2-8
	run_nvcc.cmake 
Log Message:
CMake 2.8.1-rc1


Index: run_nvcc.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindCUDA/run_nvcc.cmake,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C 2 -d -r1.2.2.2 -r1.2.2.3
*** run_nvcc.cmake	9 Oct 2009 20:11:11 -0000	1.2.2.2
--- run_nvcc.cmake	28 Jan 2010 21:47:43 -0000	1.2.2.3
***************
*** 151,166 ****
    )
  
  # Generate the dependency file
  cuda_execute_process(
    "Generating dependency file: ${NVCC_generated_dependency_file}"
    COMMAND "${CUDA_NVCC_EXECUTABLE}"
    "${source_file}"
!   ${CUDA_NVCC_FLAGS}
!   ${nvcc_flags}
    ${CCBIN}
    ${nvcc_host_compiler_flags}
    -DNVCC
-   -M
-   -o "${NVCC_generated_dependency_file}"
    ${CUDA_NVCC_INCLUDE_ARGS}
    )
--- 151,180 ----
    )
  
+ # 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(
    "Generating dependency file: ${NVCC_generated_dependency_file}"
    COMMAND "${CUDA_NVCC_EXECUTABLE}"
+   -M
    "${source_file}"
!   -o "${NVCC_generated_dependency_file}"
    ${CCBIN}
+   ${nvcc_flags}
    ${nvcc_host_compiler_flags}
+   ${depends_CUDA_NVCC_FLAGS}
    -DNVCC
    ${CUDA_NVCC_INCLUDE_ARGS}
    )
***************
*** 210,219 ****
    COMMAND "${CUDA_NVCC_EXECUTABLE}"
    "${source_file}"
!   ${CUDA_NVCC_FLAGS}
!   ${nvcc_flags}
    ${CCBIN}
    ${nvcc_host_compiler_flags}
    -DNVCC
-   ${format_flag} -o "${generated_file}"
    ${CUDA_NVCC_INCLUDE_ARGS}
    )
--- 224,233 ----
    COMMAND "${CUDA_NVCC_EXECUTABLE}"
    "${source_file}"
!   ${format_flag} -o "${generated_file}"
    ${CCBIN}
+   ${nvcc_flags}
    ${nvcc_host_compiler_flags}
+   ${CUDA_NVCC_FLAGS}
    -DNVCC
    ${CUDA_NVCC_INCLUDE_ARGS}
    )



More information about the Cmake-commits mailing list