summaryrefslogtreecommitdiff
path: root/Modules/FindCUDA
diff options
context:
space:
mode:
authorJames Bigler <jamesbigler@gmail.com>2016-02-05 14:32:01 -0700
committerJames Bigler <jamesbigler@gmail.com>2016-02-05 14:32:01 -0700
commit4b561b4cb528a3d6fee6baa79dacfff31923a9b6 (patch)
tree9a64bbef82882beea8d80afa2fd19f8e3b1113f8 /Modules/FindCUDA
parent5ee00b71e94f5daa985b8453ae67b125ea0983d9 (diff)
downloadcmake-4b561b4cb528a3d6fee6baa79dacfff31923a9b6.tar.gz
FindCUDA: Fix for when a non-existent dependency file is found.
Previously if a non-existent dependency file is found we set the file to "" and then do if(NOT IS_DIRECTORY "${file}"). Later we call get_filename_component on the empty file which returns basically the current build directory. Having a dependency on the current build directory is really annoying, because anything that compiles into that directory will change the file stamp and cause your files to rebuild every time you call make. :(
Diffstat (limited to 'Modules/FindCUDA')
-rw-r--r--Modules/FindCUDA/make2cmake.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindCUDA/make2cmake.cmake b/Modules/FindCUDA/make2cmake.cmake
index c433fa8ed4..7b3ca03db2 100644
--- a/Modules/FindCUDA/make2cmake.cmake
+++ b/Modules/FindCUDA/make2cmake.cmake
@@ -67,7 +67,7 @@ if (NOT "${depend_text}" STREQUAL "")
endif()
endif()
- if(NOT IS_DIRECTORY "${file}")
+ if(file AND NOT IS_DIRECTORY "${file}")
# If softlinks start to matter, we should change this to REALPATH. For now we need
# to flatten paths, because nvcc can generate stuff like /bin/../include instead of
# just /include.