summaryrefslogtreecommitdiff
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-03-29 00:00:54 +0200
committerRolf Eike Beer <eike@sf-mail.de>2012-08-14 21:02:58 +0200
commitb04650e163320353762b6ec196afa9500345b5cd (patch)
tree1790b38ae7db75f232a27f4aa796d4441c68f009 /Modules/FindCUDA.cmake
parentcd3bd23266a4a6c00595134a17a8bdaea9e28af5 (diff)
downloadcmake-b04650e163320353762b6ec196afa9500345b5cd.tar.gz
use the find_* functions ENV parameter
Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR. This will make sure the paths will get correctly handled through different platforms, especially on Windows. Also fixes one place where paths with windows delimiters (\) were hardcoded to use forward slashes.
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r--Modules/FindCUDA.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index f152437807..6a6be47c6e 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -650,9 +650,11 @@ endif()
# Look for the SDK stuff. As of CUDA 3.0 NVSDKCUDA_ROOT has been replaced with
# NVSDKCOMPUTE_ROOT with the old CUDA C contents moved into the C subdirectory
find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h
+ HINTS
"$ENV{NVSDKCOMPUTE_ROOT}/C"
- "$ENV{NVSDKCUDA_ROOT}"
+ ENV NVSDKCUDA_ROOT
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]"
+ PATHS
"/Developer/GPU\ Computing/C"
)