Skip to content

Commit dd5a11a

Browse files
committed
Update
1 parent 5ffa824 commit dd5a11a

File tree

1 file changed

+25
-37
lines changed

1 file changed

+25
-37
lines changed

cmake/FindHipoDeps.cmake

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,37 @@
11
# BLAS
2+
23
option(BLAS_ROOT "Root directory of BLAS or OpenBLAS" "")
34
message(STATUS "BLAS_ROOT is " ${BLAS_ROOT})
45

5-
if (WIN32)
6-
find_package(OpenBLAS CONFIG REQUIRED)
7-
message(STATUS "OpenBLAS CMake config path: ${OpenBLAS_DIR}")
6+
find_library(OPENBLAS_LIB
7+
NAMES openblas
8+
HINTS "${BLAS_ROOT}/lib")
89

9-
find_package(metis CONFIG REQUIRED)
10-
message(STATUS "metis CMake config path: ${metis_DIR}")
11-
elseif(NOT APPLE)
12-
# LINUX
13-
find_library(OPENBLAS_LIB
14-
NAMES openblas
10+
if(OPENBLAS_LIB)
11+
message("Found OpenBLAS library at ${OPENBLAS_LIB}")
12+
else(OPENBLAS_LIB)
13+
find_library(BLAS_LIB
14+
NAMES blas
15+
REQUIRED
1516
HINTS "${BLAS_ROOT}/lib")
17+
message("Found BLAS library at ${BLAS_LIB}")
18+
endif(OPENBLAS_LIB)
1619

17-
if(OPENBLAS_LIB)
18-
message("Found OpenBLAS library at ${OPENBLAS_LIB}")
19-
20-
else(OPENBLAS_LIB)
21-
find_library(BLAS_LIB
22-
NAMES blas HINTS
23-
"${BLAS_ROOT}/lib")
20+
# METIS
2421

25-
if(NOT BLAS_LIB)
26-
message(FATAL_ERROR "No BLAS library found")
27-
endif(NOT BLAS_LIB)
28-
message("Found BLAS library at ${BLAS_LIB}")
29-
endif(OPENBLAS_LIB)
22+
option(METIS_ROOT "Root directory of METIS" "")
23+
message(STATUS "METIS_ROOT is " ${METIS_ROOT})
3024

31-
endif()
25+
find_path(METIS_PATH
26+
NAMES "metis.h"
27+
REQUIRED
28+
HINTS "${METIS_ROOT}/include")
3229

33-
if (NOT WIN32)
34-
option(METIS_ROOT "Root directory of METIS" "")
35-
message(STATUS "METIS_ROOT is " ${METIS_ROOT})
30+
message("Found Metis header at ${METIS_PATH}")
3631

37-
find_path(METIS_PATH
38-
NAMES "metis.h"
39-
REQUIRED
40-
HINTS "${METIS_ROOT}/include")
41-
42-
message("Found Metis header at ${METIS_PATH}")
32+
find_library(METIS_LIB
33+
NAMES metis
34+
REQUIRED
35+
HINTS "${METIS_ROOT}/lib")
4336

44-
find_library(METIS_LIB
45-
NAMES metis
46-
REQUIRED
47-
HINTS "${METIS_ROOT}/lib")
48-
message("Found Metis library at ${METIS_LIB}")
49-
endif()
37+
message("Found Metis library at ${METIS_LIB}")

0 commit comments

Comments
 (0)