Skip to content

Commit

Permalink
Merge pull request #39 from polyfem/find-blas-lapack
Browse files Browse the repository at this point in the history
Find BLAS and LAPACK if not using MKL
  • Loading branch information
teseoch authored Oct 4, 2023
2 parents 91f7e3a + b67ecc3 commit 2915048
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions cmake/recipes/blas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm64" OR "${CMAKE_OSX_ARCHITECTURES}" M
# Use Accelerate on macOS M1
set(BLA_VENDOR Apple)
find_package(BLAS REQUIRED)
else()
# Use MKL on other platforms
elseif(POLYSOLVE_WITH_MKL)
# Use MKL if enabled
include(mkl)
add_library(BLAS::BLAS ALIAS mkl::mkl)
else()
# otherwise find system version
find_package(BLAS REQUIRED)
endif()
7 changes: 5 additions & 2 deletions cmake/recipes/lapack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm64" OR "${CMAKE_OSX_ARCHITECTURES}" M
# Use Accelerate on macOS M1
set(BLA_VENDOR Apple)
find_package(LAPACK REQUIRED)
else()
# Use MKL on other platforms
elseif(POLYSOLVE_WITH_MKL)
# Use MKL if enabled
include(mkl)
add_library(LAPACK::LAPACK ALIAS mkl::mkl)
else()
# otherwise find system version
find_package(LAPACK REQUIRED)
endif()

0 comments on commit 2915048

Please sign in to comment.