Commit a10bb4b9 authored by Christoph Junghans's avatar Christoph Junghans
Browse files

cmake: fix link issue with --as-needed

parent b47e4922
...@@ -276,11 +276,14 @@ endif() ...@@ -276,11 +276,14 @@ endif()
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE) if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
find_package(LAPACK) find_package(LAPACK)
if(NOT LAPACK_FOUND) find_package(BLAS)
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
enable_language(Fortran) enable_language(Fortran)
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.[fF]) file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.[fF])
add_library(linalg STATIC ${LAPACK_SOURCES}) add_library(linalg STATIC ${LAPACK_SOURCES})
set(LAPACK_LIBRARIES linalg) set(LAPACK_LIBRARIES linalg)
else()
list(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})
endif() endif()
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment