Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/pkgs/dsdp: Use find_package(LAPACK)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 9, 2022
1 parent 50b8e2e commit a10dd81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions build/pkgs/dsdp/patches/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ cmake_minimum_required(VERSION 3.0)
project (dsdp VERSION 5.8 LANGUAGES C)

link_directories(${LIBRARY_PREFIX}/lib)
find_library(BLAS_LIB blas)
find_library(LAPACK_LIB lapack)

find_package(LAPACK REQUIRED)

include_directories(include src/vecmat src/solver src/sdp)
FILE (GLOB_RECURSE SRCS src/*.c)
if(WIN32)
Expand All @@ -12,7 +13,7 @@ endif()

## DSDP shared library
add_library(dsdp ${SRCS})
target_link_libraries(dsdp ${BLAS_LIB} ${LAPACK_LIB})
target_link_libraries(dsdp ${LAPACK_LIBRARIES})
target_include_directories(dsdp PUBLIC include src/vecmat src/solver src/sdp)
target_compile_options(dsdp PUBLIC -O2)

Expand Down
5 changes: 4 additions & 1 deletion build/pkgs/dsdp/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
cd src
cp ../patches/CMakeLists.txt .
sdh_cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON
-DBUILD_SHARED_LIBS=ON \
-DBLA_VENDOR=OpenBLAS \
-DBLAS_LIBRARIES="$(pkg-config --libs blas)" \
-DLAPACK_LIBRARIES="$(pkg-config --libs lapack)"
sdh_make
sdh_make_install

0 comments on commit a10dd81

Please sign in to comment.