diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
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() |