File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,26 @@ python_add_library(_core MODULE highs/highs_bindings.cpp WITH_SOABI)
5656target_link_libraries (_core PRIVATE pybind11::headers)
5757
5858if (HIPO)
59- target_link_libraries (_core PRIVATE OpenBLAS::OpenBLAS)
59+ if (WIN32 )
60+ target_link_libraries (_core PRIVATE OpenBLAS::OpenBLAS)
61+ target_compile_definitions (_core PRIVATE HIPO_USES_OPENBLAS)
62+ else ()
6063 # if (NOT METIS_ROOT STREQUAL "")
6164 # target_include_directories(_core PRIVATE ${METIS_DST_DIR}/include)
6265 # target_link_libraries(_core PRIVATE ${METIS_DST_DIR}/lib/metis.lib)
6366 # else()
6467
68+ target_link_libraries (highs PRIVATE BLAS::BLAS)
69+
70+ string (TOLOWER "${BLAS_LIBRARIES} " blas_lower)
71+ if (blas_lower MATCHES "openblas" )
72+ target_compile_definitions (_core PRIVATE HIPO_USES_OPENBLAS)
73+ elseif (blas_lower MATCHES "accelerate" )
74+ target_compile_definitions (_core PRIVATE HIPO_USES_APPLE_BLAS)
75+ endief()
76+
77+ endif ()
78+
6579 if (metis_FOUND)
6680 target_link_libraries (_core PRIVATE metis)
6781 else ()
You can’t perform that action at this time.
0 commit comments