Skip to content

Commit 92e1d72

Browse files
committed
modified metis
1 parent ba916d2 commit 92e1d72

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

cmake/FindHipoDeps.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ 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 AND NOT (METIS_ROOT STREQUAL ""))
149-
set(METIS_SRC_DIR ${METIS_ROOT})
150-
set(METIS_DST_DIR ${CMAKE_BINARY_DIR}/metis)
151-
file(COPY ${METIS_SRC_DIR}/include DESTINATION ${METIS_DST_DIR})
152-
file(COPY ${METIS_SRC_DIR}/lib DESTINATION ${METIS_DST_DIR})
153-
return()
154-
endif()
148+
# if (PYTHON_BUILD_SETUP AND NOT (METIS_ROOT STREQUAL ""))
149+
# set(METIS_SRC_DIR ${METIS_ROOT})
150+
# set(METIS_DST_DIR ${CMAKE_BINARY_DIR}/metis)
151+
# file(COPY ${METIS_SRC_DIR}/include DESTINATION ${METIS_DST_DIR})
152+
# file(COPY ${METIS_SRC_DIR}/lib DESTINATION ${METIS_DST_DIR})
153+
# return()
154+
# endif()
155155

156156
# If a METIS install was specified try to use it first.
157157
if (NOT (METIS_ROOT STREQUAL ""))

cmake/python-highs.cmake

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,18 @@ target_link_libraries(_core PRIVATE pybind11::headers)
5757

5858
if (HIPO)
5959
target_link_libraries(_core PRIVATE OpenBLAS::OpenBLAS)
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()
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+
65+
if(metis_FOUND)
6466
target_link_libraries(_core PRIVATE metis)
67+
else()
68+
target_include_directories(_core PRIVATE "${METIS_PATH}")
69+
target_link_libraries(_core PRIVATE "${METIS_LIB}")
6570
endif()
71+
6672
endif()
6773

6874
# sources for python

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ cmake.args = [
3838
"-DHIPO=ON",
3939
"-DCMAKE_TOOLCHAIN_FILE='C:/Users/galab/code/repos/vcpkg/scripts/buildsystems/vcpkg.cmake'",
4040
"-DVCPKG_TARGET_TRIPLET='x64-windows-static'",
41-
# "-DMETIS_ROOT='C:/Users/galab/installs/metis-521-ts'"
41+
"-DMETIS_ROOT='C:/Users/galab/installs/metis-521-ts'"
4242
]
4343

4444
wheel.expand-macos-universal-tags = true

0 commit comments

Comments
 (0)