summaryrefslogtreecommitdiff
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorJames Bigler <jamesbigler@gmail.com>2011-12-05 16:29:28 -0700
committerJames Bigler <jamesbigler@gmail.com>2011-12-05 16:29:28 -0700
commitaa595440786dcd84cbca81410c76c0b170b3abac (patch)
treefd83d06a53e07904c144b06a56c453bfb566777f /Modules/FindCUDA.cmake
parente0bc42aa4ff086e9c6976ab91ba924530df0bf72 (diff)
downloadcmake-aa595440786dcd84cbca81410c76c0b170b3abac.tar.gz
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.
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r--Modules/FindCUDA.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d5ef430295..f696f2e3b1 100644
--- a/Modules/FindCUDA.cmake
+++ b/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)