summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt40
1 files changed, 26 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a982d87d..a97a4eb0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,23 +165,35 @@ if(TUNERS)
endif()
endif()
-# 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(CBLAS)
- if(OPENCL)
- find_package(clBLAS)
+# Don't search for system libraries when cross-compiling
+if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
+ if(TESTS)
+ message(STATUS "Compilation of the tests disabled for the Android target")
+ set(TESTS OFF)
endif()
- if(CUBLAS)
- find_package(cuBLAS)
+ if(CLIENTS)
+ message(STATUS "Head-to-head performance comparison not supported in the clients for the Android target")
endif()
- if(NOT CLBLAS_FOUND AND NOT CBLAS_FOUND)
- if(TESTS)
- message(STATUS "Could NOT find clBLAS nor a CPU BLAS, disabling the compilation of the tests")
- set(TESTS OFF)
+else()
+
+ # 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(CBLAS)
+ if(OPENCL)
+ find_package(clBLAS)
+ endif()
+ if(CUBLAS)
+ find_package(cuBLAS)
endif()
- if(CLIENTS)
- message(STATUS "Could NOT find clBLAS nor a CPU BLAS, head-to-head performance comparison not supported in the clients")
+ if(NOT CLBLAS_FOUND AND NOT CBLAS_FOUND)
+ if(TESTS)
+ message(STATUS "Could NOT find clBLAS nor a CPU BLAS, disabling the compilation of the tests")
+ set(TESTS OFF)
+ endif()
+ if(CLIENTS)
+ message(STATUS "Could NOT find clBLAS nor a CPU BLAS, head-to-head performance comparison not supported in the clients")
+ endif()
endif()
endif()
endif()