Skip to content

Commit

Permalink
use lapack::lapack
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Oct 19, 2023
1 parent a265b86 commit 32a00a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if(parallel)
include(cmake/lapack.cmake)
endif()

set(NUMERIC_LIBS SCALAPACK::SCALAPACK ${LAPACK_LIBRARIES})
set(NUMERIC_LIBS SCALAPACK::SCALAPACK LAPACK::LAPACK)

if(find_static AND NOT WIN32 AND
MKL IN_LIST LAPACK_VENDOR AND
Expand All @@ -64,7 +64,7 @@ if(parallel)
endif()

# avoid MPICH -fallow flag leakage
set(NUMERIC_INC ${LAPACK_INCLUDE_DIRS} ${MPI_Fortran_INCLUDE_DIRS})
set(NUMERIC_INC ${MPI_Fortran_INCLUDE_DIRS})
list(APPEND NUMERIC_LIBS ${MPI_Fortran_LIBRARIES} MPI::MPI_C)

if(openmp)
Expand Down
5 changes: 5 additions & 0 deletions cmake/FindSCALAPACK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ Scalapack include directories: ${SCALAPACK_INCLUDE_DIRS}")
set_property(TARGET SCALAPACK::SCALAPACK PROPERTY INTERFACE_LINK_LIBRARIES "${SCALAPACK_LIBRARIES}")
set_property(TARGET SCALAPACK::SCALAPACK PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${SCALAPACK_INCLUDE_DIR}")
endif()

# For MKL, we don't use FindLapack, so define LAPACK::LAPACK as alias
if(MKL_FOUND)
add_library(LAPACK::LAPACK ALIAS SCALAPACK::SCALAPACK)
endif()
endif()

mark_as_advanced(SCALAPACK_LIBRARY SCALAPACK_INCLUDE_DIR)

0 comments on commit 32a00a3

Please sign in to comment.