Skip to content

Commit fb3bbc6

Browse files
authored
Merge pull request #2620 from ERGO-Code/metis-default-path
Metis in default path without cmake config fix
2 parents dd630a0 + 2762095 commit fb3bbc6

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

cmake/FindHipoDeps.cmake

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,22 @@ else()
176176
if (metis_FOUND)
177177
message(STATUS "metis CMake config path: ${metis_DIR}")
178178
else()
179-
message(FATAL_ERROR "No Metis library found")
179+
# METIS_ROOT was not successful and there is no cmake config
180+
find_path(METIS_PATH
181+
NAMES "metis.h"
182+
REQUIRED)
183+
184+
message(STATUS "Found Metis header at ${METIS_PATH}")
185+
186+
find_library(METIS_LIB
187+
NAMES metis libmetis
188+
REQUIRED)
189+
190+
if(METIS_LIB)
191+
message(STATUS "Found Metis library at ${METIS_LIB}")
192+
else()
193+
message(FATAL_ERROR "No Metis library found")
194+
endif()
180195
endif()
181196
endif()
182197
endif()
@@ -225,14 +240,7 @@ if (NOT (GKLIB_ROOT STREQUAL ""))
225240
message(STATUS "Found GKlib library at ${GKLIB_LIB}")
226241
else()
227242
# GKLIB_ROOT was not successful
228-
message(STATUS "GKlib not found in GKLIB_PATH, fallback to default search.")
229-
find_package(GKlib CONFIG)
230-
231-
if (GKlib_FOUND)
232-
message(STATUS "GKlib CMake config path: ${GKlib_DIR}")
233-
else()
234-
message(FATAL_ERROR "No GKLib library found")
235-
endif()
243+
message(FATAL_ERROR "No GKLib library found at ${GKLIB_ROOT}")
236244
endif()
237245
endif()
238246
endif()

0 commit comments

Comments
 (0)