[Cmake-commits] CMake branch, next, updated. v2.8.6-2125-gfc522a0

James Bigler jamesbigler at gmail.com
Mon Dec 5 18:11:02 EST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  fc522a07d7c8b33d1c73a160657f8f8498819a7f (commit)
       via  893093835157c0a0e593f00c244869ffd4a11b91 (commit)
      from  1f5c6e61ffa19e9071993e9459c374cccb5fe216 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc522a07d7c8b33d1c73a160657f8f8498819a7f
commit fc522a07d7c8b33d1c73a160657f8f8498819a7f
Merge: 1f5c6e6 8930938
Author:     James Bigler <jamesbigler at gmail.com>
AuthorDate: Mon Dec 5 18:11:01 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 5 18:11:01 2011 -0500

    Merge topic 'CUDAv3.2PathChanges' into next
    
    8930938 Added support for CUDA_PATH which is present in the CUDA toolkit 3.2 onward.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=893093835157c0a0e593f00c244869ffd4a11b91
commit 893093835157c0a0e593f00c244869ffd4a11b91
Author:     James Bigler <jamesbigler at gmail.com>
AuthorDate: Mon Dec 5 16:04:00 2011 -0700
Commit:     James Bigler <jamesbigler at gmail.com>
CommitDate: Mon Dec 5 16:04:00 2011 -0700

    Added support for CUDA_PATH which is present in the CUDA toolkit 3.2 onward.
    
    This required changing how the paths were used.  I now use the PATH_SUFFIXES parameter
    instead of putting the whole path in the command.

diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d5ef430..4b176f1 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -443,7 +443,10 @@ if(NOT CUDA_TOOLKIT_ROOT_DIR)
   # Search in the CUDA_BIN_PATH first.
   find_path(CUDA_TOOLKIT_ROOT_DIR
     NAMES nvcc nvcc.exe
-    PATHS ENV CUDA_BIN_PATH
+    PATHS
+      ENV CUDA_PATH
+      ENV CUDA_BIN_PATH
+    PATH_SUFFIXES bin bin64
     DOC "Toolkit location."
     NO_DEFAULT_PATH
     )
@@ -472,9 +475,10 @@ endif (NOT CUDA_TOOLKIT_ROOT_DIR)
 # CUDA_NVCC_EXECUTABLE
 find_program(CUDA_NVCC_EXECUTABLE
   NAMES nvcc
-  PATHS "${CUDA_TOOLKIT_ROOT_DIR}/bin"
-        "${CUDA_TOOLKIT_ROOT_DIR}/bin64"
+  PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
+  ENV CUDA_PATH
   ENV CUDA_BIN_PATH
+  PATH_SUFFIXES bin bin64
   NO_DEFAULT_PATH
   )
 # Search default search paths, after we search our own set of paths.
@@ -500,8 +504,10 @@ set(CUDA_VERSION_STRING "${CUDA_VERSION}")
 # CUDA_TOOLKIT_INCLUDE
 find_path(CUDA_TOOLKIT_INCLUDE
   device_functions.h # Header included in toolkit
-  PATHS "${CUDA_TOOLKIT_ROOT_DIR}/include"
+  PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
+  ENV CUDA_PATH
   ENV CUDA_INC_PATH
+  PATH_SUFFIXES include
   NO_DEFAULT_PATH
   )
 # Search default search paths, after we search our own set of paths.
@@ -516,19 +522,16 @@ macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
     # CUDA 3.2+ on Windows moved the library directoryies, so we need the new
     # and old paths.
-    set(_cuda_64bit_lib_dir
-      "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64"
-      "${CUDA_TOOLKIT_ROOT_DIR}/lib64"
-      )
+    set(_cuda_64bit_lib_dir "lib/x64" "lib64" )
   endif()
   # CUDA 3.2+ on Windows moved the library directories, so we need to new
   # (lib/Win32) and the old path (lib).
   find_library(${_var}
     NAMES ${_names}
-    PATHS ${_cuda_64bit_lib_dir}
-          "${CUDA_TOOLKIT_ROOT_DIR}/lib/Win32"
-          "${CUDA_TOOLKIT_ROOT_DIR}/lib"
+    PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
+    ENV CUDA_PATH
     ENV CUDA_LIB_PATH
+    PATH_SUFFIXES ${_cuda_64bit_lib_dir} "lib/Win32" "lib"
     DOC ${_doc}
     NO_DEFAULT_PATH
     )

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindCUDA.cmake |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list