summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-04-03 21:45:18 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2017-04-03 21:45:18 +0200
commit0cebcbcc71d8c2d52b0d339fc75032e189d5946f (patch)
treea1cc3d80027ccc28e17f82114bea350cac4d8264 /CMakeLists.txt
parenteb1fda2729c4022493aa874e3fe81d2a270085a1 (diff)
Added proper CMake searching for CUDA and cuBLAS
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 6 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9af0b91..0fb04071 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,18 +129,13 @@ if(TUNERS)
endif()
endif()
-# Locates the reference BLAS libraries in case the tests need to be compiled. The "FindclBLAS.cmake"
-# and "FindCBLAS.cmake" are included, "FindCUDA.cmake" is provided by CMake.
+# Locates the reference BLAS libraries in case the tests need to be compiled. The "FindclBLAS.cmake",
+# "FindCBLAS.cmake" and "FindcuBLAS.cmake" are included.
if(CLIENTS OR TESTS)
find_package(clBLAS)
find_package(CBLAS)
- find_package(CUDA QUIET) # for cuBLAS
- if(CUDA_FOUND)
- message(STATUS "CUDA and cuBLAS found")
- else()
- message(STATUS "Could not find cuBLAS as a reference")
- endif()
- if(NOT CLBLAS_FOUND AND NOT CBLAS_FOUND AND NOT CUDA_FOUND)
+ find_package(cuBLAS)
+ if(NOT CLBLAS_FOUND AND NOT CBLAS_FOUND AND NOT CUBLAS_FOUND)
if(TESTS)
message(STATUS "Could NOT find clBLAS nor a CPU BLAS nor cuBLAS, disabling the compilation of the tests")
set(TESTS OFF)
@@ -326,9 +321,9 @@ if(CLIENTS OR TESTS)
add_definitions(" -DCLBLAST_REF_CBLAS")
endif()
endif()
- if(CUDA_FOUND)
+ if(CUBLAS_FOUND)
set(REF_INCLUDES ${REF_INCLUDES} ${CUDA_INCLUDE_DIRS})
- set(REF_LIBRARIES ${REF_LIBRARIES} ${CUDA_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES})
+ set(REF_LIBRARIES ${REF_LIBRARIES} ${CUDA_LIBRARIES} ${CUBLAS_LIBRARIES})
if(MSVC)
add_definitions(" /DCLBLAST_REF_CUBLAS")
else()