Skip to content

Commit b36c1e7

Browse files
committed
Update
1 parent 23a0ed6 commit b36c1e7

File tree

3 files changed

+7
-33
lines changed

3 files changed

+7
-33
lines changed

.github/julia/build_tarballs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

cmake/FindHipoDeps.cmake

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,14 @@
33
option(BLAS_ROOT "Root directory of BLAS or OpenBLAS" "")
44
message(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-
2414
option(METIS_ROOT "Root directory of METIS" "")
2515
message(STATUS "METIS_ROOT is " ${METIS_ROOT})
2616

highs/CMakeLists.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)