forked from codeplaysoftware/portBLAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
45 lines (29 loc) · 1.07 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required (VERSION 3.2.2)
project(sycl-blas)
enable_testing()
message(STATUS "Path to the SYCL implementation ")
set(SYCLBLAS_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
include(FindOpenCL)
include(FindComputeCpp)
include(FindBLAS)
if (DEFINED OPENBLAS_ROOT)
set(USE_OPENBLAS ON)
else()
set(USE_OPENBLAS OFF)
endif()
if(USE_OPENBLAS)
message(STATUS "Will enable comparison with clBLAS")
set(OPENBLAS_LIBRARIES "${OPENBLAS_ROOT}/lib/libopenblas.so")
set(OPENBLAS_INCLUDE "${OPENBLAS_ROOT}/include/")
endif(USE_OPENBLAS)
message(STATUS "${COMPUTECPP_DEVICE_COMPILER_FLAGS}")
# We add some flags to workaround OpenCL platform bugs, see ComputeCpp documentation
set(COMPUTECPP_DEVICE_COMPILER_FLAGS
"${COMPUTECPP_DEVICE_COMPILER_FLAGS} -no-serial-memop -sycl-compress-name")
message(STATUS "${COMPUTECPP_DEVICE_COMPILER_FLAGS}")
include_directories(${SYCLBLAS_INCLUDE} ${COMPUTECPP_INCLUDE_DIRECTORY})
if (USE_OPENBLAS)
include_directories(${OPENBLAS_INCLUDE})
endif()
add_subdirectory(test)