diff options
author | Brad King <brad.king@kitware.com> | 2010-09-14 17:19:10 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-09-14 17:19:10 (GMT) |
commit | f2a813d51ca38d45aeea214690f1774b995c1851 (patch) | |
tree | ea847f3a92a1443532277e53d53ca7385cb6bc57 /Modules | |
parent | 6426a86d5ede25f8c3178b120fef6214e959983b (diff) | |
parent | 4f0636e9795200985ed8906b3d8821da350a1bb3 (diff) | |
download | CMake-f2a813d51ca38d45aeea214690f1774b995c1851.zip CMake-f2a813d51ca38d45aeea214690f1774b995c1851.tar.gz CMake-f2a813d51ca38d45aeea214690f1774b995c1851.tar.bz2 |
Merge topic 'CUDAv3.2PathChanges'
4f0636e Added CUDA 3.2 directory changes. Disable emulation mode for CUDA 3.1+.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindCUDA.cmake | 25 |
1 files changed, 22 insertions, 3 deletions
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) |