-
Notifications
You must be signed in to change notification settings - Fork 1
/
FindACML.cmake
58 lines (49 loc) · 1.1 KB
/
FindACML.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
50
51
52
53
54
55
56
57
58
if (ACML_INCLUDES AND ACML_LIBRARIES)
set(ACML_FIND_QUIETLY TRUE)
endif (ACML_INCLUDES AND ACML_LIBRARIES)
find_path(ACML_INCLUDES
NAMES
acml.h
PATHS
$ENV{ACMLDIR}/include
$ENV{ACML_DIR}/include
${INCLUDE_INSTALL_DIR}
)
find_library(ACML_LIBRARIES
NAMES
acml_mp acml_mv
PATHS
$ENV{ACMLDIR}/lib
$ENV{ACML_DIR}/lib
${LIB_INSTALL_DIR}
)
find_file(ACML_LIBRARIES
NAMES
libacml_mp.so
PATHS
/usr/lib
$ENV{ACMLDIR}/lib
${LIB_INSTALL_DIR}
)
if(NOT ACML_LIBRARIES)
message(STATUS "Multi-threaded library not found, looking for single-threaded")
find_library(ACML_LIBRARIES
NAMES
acml acml_mv
PATHS
$ENV{ACMLDIR}/lib
$ENV{ACML_DIR}/lib
${LIB_INSTALL_DIR}
)
find_file(ACML_LIBRARIES
libacml.so libacml_mv.so
PATHS
/usr/lib
$ENV{ACMLDIR}/lib
${LIB_INSTALL_DIR}
)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ACML DEFAULT_MSG
ACML_INCLUDES ACML_LIBRARIES)
mark_as_advanced(ACML_INCLUDES ACML_LIBRARIES)