浏览代码

Reset dependency file list when a dependency disappeared.

Fix a long outstanding bug when a file in the dependency list wasn't found.  This bug
wouldn't reset the dependencies, so the makefile would still want the missing file when
building.  The work around was to configure twice, but this is no longer necessary.
James Bigler 14 年之前
父节点
当前提交
aa59544078
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Modules/FindCUDA.cmake

+ 2 - 0
Modules/FindCUDA.cmake

@@ -339,6 +339,8 @@ macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
   # output depend on the dependency file itself, which should cause the
   # rule to re-run.
   if(CUDA_NVCC_DEPEND_REGENERATE)
+    set(CUDA_NVCC_DEPEND ${dependency_file})
+    #message("Generating an empty dependency_file: ${dependency_file}")
     file(WRITE ${dependency_file} "#FindCUDA.cmake generated file.  Do not edit.\n")
   endif(CUDA_NVCC_DEPEND_REGENERATE)