summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorJames Bigler <jamesbigler@gmail.com>2011-12-05 23:29:28 (GMT)
committerJames Bigler <jamesbigler@gmail.com>2011-12-05 23:29:28 (GMT)
commitaa595440786dcd84cbca81410c76c0b170b3abac (patch)
treefd83d06a53e07904c144b06a56c453bfb566777f /Modules/FindCUDA.cmake
parente0bc42aa4ff086e9c6976ab91ba924530df0bf72 (diff)
downloadCMake-aa595440786dcd84cbca81410c76c0b170b3abac.zip
CMake-aa595440786dcd84cbca81410c76c0b170b3abac.tar.gz
CMake-aa595440786dcd84cbca81410c76c0b170b3abac.tar.bz2
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 d5ef430..f696f2e 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)