File tree Expand file tree Collapse file tree 3 files changed +7
-33
lines changed
Expand file tree Collapse file tree 3 files changed +7
-33
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
3434 -DBUILD_SHARED_LIBS=${BUILD_SHARED} \
3535 -DZLIB_USE_STATIC_LIBS=${BUILD_STATIC} \
3636 -DHIPO=ON \
37- -DBLAS_ROOT ="${prefix }" \
37+ -DBLAS_LIBRARIES ="${libdir}/libopenblas.${dlext }" \
3838 -DMETIS_ROOT=${prefix} \
3939 ..
4040
Original file line number Diff line number Diff line change 33option (BLAS_ROOT "Root directory of BLAS or OpenBLAS" "" )
44message (STATUS "BLAS_ROOT is " ${BLAS_ROOT} )
55
6- find_library (OPENBLAS_LIB
7- NAMES openblas
8- PATHS "${BLAS_ROOT} /lib"
9- NO_DEFAULT_PATH)
6+ find_package (BLAS REQUIRED)
107
11- if (OPENBLAS_LIB)
12- message ("Found OpenBLAS library at ${OPENBLAS_LIB} " )
13- else (OPENBLAS_LIB)
14- find_library (BLAS_LIB
15- NAMES blas
16- REQUIRED
17- PATHS "${BLAS_ROOT} /lib"
18- NO_DEFAULT_PATH)
19- message ("Found BLAS library at ${BLAS_LIB} " )
20- endif (OPENBLAS_LIB)
8+ if (BLAS_FOUND)
9+ message (STATUS "Using BLAS library: ${BLAS_LIBRARIES} " )
10+ message (STATUS "BLAS include dirs: ${BLAS_INCLUDE_DIRS} " )
11+ endif ()
2112
2213# METIS
23-
2414option (METIS_ROOT "Root directory of METIS" "" )
2515message (STATUS "METIS_ROOT is " ${METIS_ROOT} )
2616
Original file line number Diff line number Diff line change @@ -178,33 +178,17 @@ else()
178178
179179 # Optional HIPO
180180 if (HIPO)
181-
182181 target_include_directories (highs PRIVATE
183182 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /highs/hipo>
184183 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /highs/hipo/auxiliary>
185184 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /highs/hipo/factorhighs>
186185 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /highs/hipo/ipm>
187186 )
188-
189- if (APPLE )
190- target_link_libraries (highs "-framework Accelerate" )
191- target_compile_definitions (highs PRIVATE HIPO_USES_APPLE_BLAS)
192- else ()
193- # LINUX
194- if (BLAS_LIB)
195- target_link_libraries (highs "${BLAS_LIB} " )
196- elseif (OPENBLAS_LIB)
197- target_link_libraries (highs "${OPENBLAS_LIB} " )
198- target_compile_definitions (highs PRIVATE HIPO_USES_OPENBLAS)
199- else ()
200- message (FATAL_ERROR "No BLAS library available" )
201- endif (BLAS_LIB)
202- endif (APPLE )
187+ target_link_libraries (highs ${BLAS_LIBRARIES} )
203188 target_include_directories (highs PRIVATE "${METIS_PATH} " )
204189 target_link_libraries (highs "${METIS_LIB} " )
205190 endif ()
206191
207-
208192 if (MSVC )
209193 list (APPEND highs_compile_opts
210194 "/bigobj" # Allow big object
You can’t perform that action at this time.
0 commit comments