Skip to content

Commit 5347d6f

Browse files
committed
wip
1 parent 5ef10ab commit 5347d6f

File tree

6 files changed

+10
-1659
lines changed

6 files changed

+10
-1659
lines changed

cmake/FindHipoDeps.cmake

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,25 +145,20 @@ endif()
145145
set(METIS_ROOT "" CACHE STRING "Root directory of METIS")
146146
message(STATUS "METIS_ROOT is " ${METIS_ROOT})
147147

148-
if (PYTHON_BUILD_SETUP)
149-
148+
if (PYTHON_BUILD_SETUP AND NOT (METIS_ROOT STREQUAL ""))
150149
set(METIS_SRC_DIR ${METIS_ROOT})
151150
set(METIS_DST_DIR ${CMAKE_BINARY_DIR}/metis)
152-
153151
file(COPY ${METIS_SRC_DIR}/include DESTINATION ${METIS_DST_DIR})
154152
file(COPY ${METIS_SRC_DIR}/lib DESTINATION ${METIS_DST_DIR})
155-
156153
return()
157-
158154
endif()
159155

160-
161156
# If a METIS install was specified try to use it first.
162157
if (NOT (METIS_ROOT STREQUAL ""))
163158
message(STATUS "Looking for METIS CMake targets file in " ${METIS_ROOT})
164159
find_package(metis CONFIG NO_DEFAULT_PATH QUIET)
165160
else()
166-
find_package(metis CONFIG QUIET)
161+
find_package(metis CONFIG)
167162
endif()
168163

169164
if(metis_FOUND)

cmake/python-highs.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ python_add_library(_core MODULE highs/highs_bindings.cpp WITH_SOABI)
5656
target_link_libraries(_core PRIVATE pybind11::headers)
5757

5858
if (HIPO)
59-
target_include_directories(_core PRIVATE ${METIS_DST_DIR}/include)
6059
target_link_libraries(_core PRIVATE OpenBLAS::OpenBLAS)
61-
target_link_libraries(_core PRIVATE ${METIS_DST_DIR}/lib/metis.lib)
60+
if (NOT METIS_ROOT STREQUAL "")
61+
target_include_directories(_core PRIVATE ${METIS_DST_DIR}/include)
62+
target_link_libraries(_core PRIVATE ${METIS_DST_DIR}/lib/metis.lib)
63+
else()
64+
target_link_libraries(_core PRIVATE metis)
65+
endif()
6266
endif()
6367

6468
# sources for python

0 commit comments

Comments
 (0)