-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindBLASFEO.cmake
42 lines (37 loc) · 1.33 KB
/
FindBLASFEO.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
MESSAGE( STATUS "********************************************************************************" )
MESSAGE( STATUS "Looking for BLASFEO package: \n" )
#
# Include folders
#
MESSAGE( STATUS "Looking for BLASFEO include directories" )
FIND_PATH(BLASFEO_INCLUDE_DIR "blasfeo_target.h"
HINTS ${BLASFEO_DIR}/include $ENV{BLASFEO_DIR}/include "/opt/blasfeo/include"
)
IF( BLASFEO_INCLUDE_DIR )
MESSAGE( STATUS "Found BLASFEO include directories: ${BLASFEO_INCLUDE_DIR} \n" )
SET( BLASFEO_INCLUDE_DIRS_FOUND TRUE )
ELSE( BLASFEO_INCLUDE_DIR )
MESSAGE( STATUS "Could not find BLASFEO include directories \n" )
ENDIF( BLASFEO_INCLUDE_DIR )
#
# Libraries
#
FIND_LIBRARY( BLASFEO_STATIC_LIB blasfeo
HINTS ${BLASFEO_DIR} $ENV{BLASFEO_DIR} "/opt/blasfeo/lib"
)
IF( BLASFEO_STATIC_LIB )
MESSAGE( STATUS "Found BLASFEO static library: ${BLASFEO_STATIC_LIB} \n" )
SET( BLASFEO_STATIC_LIBS_FOUND TRUE )
ELSE( BLASFEO_STATIC_LIB )
MESSAGE( STATUS "Could not find BLASFEO static library.\n" )
SET( BLASFEO_STATIC_LIBS_FOUND FALSE )
ENDIF( BLASFEO_STATIC_LIB )
#
# And finally set found flag...
#
IF( BLASFEO_INCLUDE_DIRS_FOUND AND BLASFEO_STATIC_LIBS_FOUND )
SET( BLASFEO_FOUND TRUE )
ELSEIF (BLASFEO_FIND_REQUIRED)
message(FATAL_ERROR "BLASFEO not found")
ENDIF()
MESSAGE( STATUS "********************************************************************************" )