summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJames Bigler <jamesbigler@gmail.com>2011-12-20 21:20:04 (GMT)
committerJames Bigler <jamesbigler@gmail.com>2011-12-20 21:20:04 (GMT)
commit154f53738f05ebbb22a369e852453beaaf981cb7 (patch)
tree33b27f88d9ba756c192b121e12c04955c12df328 /Modules
parent7f8cf4236d523483560c500335a8644b5f769089 (diff)
downloadCMake-154f53738f05ebbb22a369e852453beaaf981cb7.zip
CMake-154f53738f05ebbb22a369e852453beaaf981cb7.tar.gz
CMake-154f53738f05ebbb22a369e852453beaaf981cb7.tar.bz2
Added support for curand, cusparse, npp, nvcuenc and nvcuvid libraries.
This addresses Bug 11882 which provided a sample implementation for adding support for cusparse. I went ahead and added all the libraries I thought appropriate.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA.cmake31
1 files changed, 30 insertions, 1 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 18f7442..4d91a92 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -216,6 +216,18 @@
# CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
# implementation (alterative to:
# CUDA_ADD_CUBLAS_TO_TARGET macro).
+# CUDA_curand_LIBRARY -- CUDA Random Number Generation library.
+# Only available for CUDA version 3.2+.
+# CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library.
+# Only available for CUDA version 3.2+.
+# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives library.
+# Only available for CUDA version 4.0+.
+# CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library.
+# Only available for CUDA version 3.2+.
+# Windows only.
+# CUDA_nvcuvid_LIBRARY -- CUDA Video Decoder library.
+# Only available for CUDA version 3.2+.
+# Windows only.
#
#
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
@@ -430,6 +442,11 @@ if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
unset(CUDA_cublasemu_LIBRARY CACHE)
unset(CUDA_cufft_LIBRARY CACHE)
unset(CUDA_cufftemu_LIBRARY CACHE)
+ unset(CUDA_curand_LIBRARY CACHE)
+ unset(CUDA_cusparse_LIBRARY CACHE)
+ unset(CUDA_npp_LIBRARY CACHE)
+ unset(CUDA_nvcuvenc_LIBRARY CACHE)
+ unset(CUDA_nvcuvid_LIBRARY CACHE)
endif()
if(NOT "${CUDA_SDK_ROOT_DIR}" STREQUAL "${CUDA_SDK_ROOT_DIR_INTERNAL}")
@@ -600,7 +617,7 @@ if(CUDA_VERSION VERSION_GREATER "3.0")
endif()
endif()
-# Search for cufft and cublas libraries.
+# Search for additional CUDA toolkit libraries.
if(CUDA_VERSION VERSION_LESS "3.1")
# Emulation libraries aren't available in version 3.1 onward.
find_cuda_helper_libs(cufftemu)
@@ -608,6 +625,18 @@ if(CUDA_VERSION VERSION_LESS "3.1")
endif()
find_cuda_helper_libs(cufft)
find_cuda_helper_libs(cublas)
+if(NOT CUDA_VERSION VERSION_LESS "3.2")
+ # cusparse showed up in version 3.2
+ find_cuda_helper_libs(cusparse)
+ find_cuda_helper_libs(curand)
+ if (WIN32)
+ find_cuda_helper_libs(nvcuvenc)
+ find_cuda_helper_libs(nvcuvid)
+ endif()
+endif()
+if(NOT CUDA_VERSION VERSION_LESS "4.0")
+ find_cuda_helper_libs(npp)
+endif()
if (CUDA_BUILD_EMULATION)
set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY})