summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-10-29 16:45:56 +0100
committerGitHub <noreply@github.com>2017-10-29 16:45:56 +0100
commit19c53f6dd06e1fc2b3f71ab738bd97af070fe627 (patch)
tree894631428f17b75dc144def614ffde885beeca21 /CMakeLists.txt
parentfa6e5e67f585b77d34c3031c176de9a0f7904aa9 (diff)
parentf24d611e575656a8e472f46b9c5c54f3c9634378 (diff)
Merge pull request #208 from CNugteren/android_support
Added Android support
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 610e5149..28093980 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()