diff options
author | David Cole <david.cole@kitware.com> | 2011-12-07 21:29:13 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-12-07 21:29:13 (GMT) |
commit | 2d1195123ec85ffd04b415914cc5127db918d2c9 (patch) | |
tree | 7a05a915e9599c1596aa220ad620c965abe3902b /Modules/FindCUDA/make2cmake.cmake | |
parent | 1eca18fd522575126b4d1e4faa3c9437d2f12e22 (diff) | |
parent | 9f18f64c7cfe57df96b6c2cd19d383f9532b6827 (diff) | |
download | CMake-2d1195123ec85ffd04b415914cc5127db918d2c9.zip CMake-2d1195123ec85ffd04b415914cc5127db918d2c9.tar.gz CMake-2d1195123ec85ffd04b415914cc5127db918d2c9.tar.bz2 |
Merge branch 'master' into AutomocIncludedDotMocFileHandling
Conflicts:
Source/cmTarget.cxx
Diffstat (limited to 'Modules/FindCUDA/make2cmake.cmake')
-rw-r--r-- | Modules/FindCUDA/make2cmake.cmake | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Modules/FindCUDA/make2cmake.cmake b/Modules/FindCUDA/make2cmake.cmake index 7fce167..d41b72d 100644 --- a/Modules/FindCUDA/make2cmake.cmake +++ b/Modules/FindCUDA/make2cmake.cmake @@ -54,13 +54,27 @@ if (${depend_text} MATCHES ".+") string(REGEX REPLACE "^ +" "" file ${file}) - if(NOT IS_DIRECTORY ${file}) + # OK, now if we had a UNC path, nvcc has a tendency to only output the first '/' + # instead of '//'. Here we will test to see if the file exists, if it doesn't then + # try to prepend another '/' to the path and test again. If it still fails remove the + # path. + + if(NOT EXISTS "${file}") + if (EXISTS "/${file}") + set(file "/${file}") + else() + message(WARNING " Removing non-existant dependency file: ${file}") + set(file "") + endif() + endif() + + if(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. get_filename_component(file_absolute "${file}" ABSOLUTE) list(APPEND dependency_list "${file_absolute}") - endif(NOT IS_DIRECTORY ${file}) + endif() endforeach(file) |