Преглед изворни кода

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)