forked from codeplaysoftware/portBLAS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
FindSyclBLAS.cmake
49 lines (42 loc) · 1.19 KB
/
FindSyclBLAS.cmake
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
46
47
48
49
# Try to find the SyclBLAS library.
#
# If the library is found then the `SyclBLAS::SyclBLAS` target will be exported
# with the required include directories.
#
# Sets the following variables:
# SyclBLAS_FOUND - whether the system has SyclBLAS
# SyclBLAS_INCLUDE_DIRS - the SyclBLAS include directory
find_path(SyclBLAS_INCLUDE_DIR
NAMES sycl_blas.h
PATH_SUFFIXES include
HINTS ${SyclBLAS_DIR}
DOC "The SyclBLAS include directory"
)
find_path(SyclBLAS_SRC_DIR
NAMES sycl_blas.hpp
PATH_SUFFIXES src
HINTS ${SyclBLAS_DIR}
DOC "The SyclBLAS source directory"
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SyclBLAS
FOUND_VAR SyclBLAS_FOUND
REQUIRED_VARS SyclBLAS_INCLUDE_DIR
SyclBLAS_SRC_DIR
)
mark_as_advanced(SyclBLAS_FOUND
SyclBLAS_SRC_DIR
SyclBLAS_INCLUDE_DIR
)
if(SyclBLAS_FOUND)
set(SyclBLAS_INCLUDE_DIRS
${SyclBLAS_INCLUDE_DIR}
${SyclBLAS_SRC_DIR}
)
endif()
if(SyclBLAS_FOUND AND NOT TARGET SyclBLAS::SyclBLAS)
add_library(SyclBLAS::SyclBLAS INTERFACE IMPORTED)
set_target_properties(SyclBLAS::SyclBLAS PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SyclBLAS_INCLUDE_DIRS}"
)
endif()