[Cmake-commits] CMake branch, next, updated. v2.8.2-745-gdbf7899

James Bigler jamesbigler at gmail.com
Fri Sep 10 13:56:31 EDT 2010


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  dbf7899e504f00efbc5fb0e65ebceba48d86845e (commit)
       via  4f0636e9795200985ed8906b3d8821da350a1bb3 (commit)
      from  8ae0a038de4dedb709c1bcbf49829f9b0741245b (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=dbf7899e504f00efbc5fb0e65ebceba48d86845e
commit dbf7899e504f00efbc5fb0e65ebceba48d86845e
Merge: 8ae0a03 4f0636e
Author:     James Bigler <jamesbigler at gmail.com>
AuthorDate: Fri Sep 10 11:54:50 2010 -0600
Commit:     James Bigler <jamesbigler at gmail.com>
CommitDate: Fri Sep 10 11:54:50 2010 -0600

    Merge branch 'CUDAv3.2PathChanges' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f0636e9795200985ed8906b3d8821da350a1bb3
commit 4f0636e9795200985ed8906b3d8821da350a1bb3
Author:     James Bigler <jamesbigler at gmail.com>
AuthorDate: Fri Sep 10 11:48:38 2010 -0600
Commit:     James Bigler <jamesbigler at gmail.com>
CommitDate: Fri Sep 10 11:48:38 2010 -0600

    Added CUDA 3.2 directory changes.  Disable emulation mode for CUDA 3.1+.
    
    CUDA 3.2 on Windows systems changed the layout of the library paths.  This adds the extra
    directories needed to locate the new files.
    
    I also explicitly disable emulation mode for CUDA 3.1+.  This feature was deprecated in
    3.0 and ultimately removed in 3.1.  The script errors out if CUDA_BUILD_EMULATION is
    turned on.  I didn't want to ignore emulation mode (even with a warning - which most
    people may not even see) and have users confused as to why it wasn't working.

diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d9b9d54..dad5709 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -514,11 +514,19 @@ set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
 
 macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    set(_cuda_64bit_lib_dir "${CUDA_TOOLKIT_ROOT_DIR}/lib64")
+    # 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"
+      )
   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"
     ENV CUDA_LIB_PATH
     DOC ${_doc}
@@ -578,9 +586,20 @@ macro(FIND_CUDA_HELPER_LIBS _name)
   mark_as_advanced(CUDA_${_name}_LIBRARY)
 endmacro(FIND_CUDA_HELPER_LIBS)
 
+#######################
+# Disable emulation for v3.1 onward
+if(CUDA_VERSION VERSION_GREATER "3.0")
+  if(CUDA_BUILD_EMULATION)
+    message(FATAL_ERROR "CUDA_BUILD_EMULATION is not supported in version 3.1 and onwards.  You must disable it to proceed.  You have version ${CUDA_VERSION}.")
+  endif()
+endif()
+
 # Search for cufft and cublas libraries.
-find_cuda_helper_libs(cufftemu)
-find_cuda_helper_libs(cublasemu)
+if(CUDA_VERSION VERSION_LESS "3.1")
+  # Emulation libraries aren't available in version 3.1 onward.
+  find_cuda_helper_libs(cufftemu)
+  find_cuda_helper_libs(cublasemu)
+endif()
 find_cuda_helper_libs(cufft)
 find_cuda_helper_libs(cublas)
 

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

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


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list