forked from lijiext/lammps
only search for LAPACK when building in static mode and when it is not needed for something else
This commit is contained in:
parent
f4df51763d
commit
24d9c537c0
|
@ -219,8 +219,7 @@ if(BUILD_OMP)
|
|||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
||||
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-PLUMED 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(BLAS)
|
||||
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
|
||||
|
|
|
@ -6,6 +6,12 @@ if(PKG_USER-PLUMED)
|
|||
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
|
||||
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
|
||||
|
||||
if((PLUMED_MODE STREQUAL "STATIC") AND NOT LAPACK_LIBRARIES)
|
||||
find_package(LAPACK REQUIRED)
|
||||
find_package(BLAS REQUIRED)
|
||||
list(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
set(DOWNLOAD_PLUMED_DEFAULT ON)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
|
|
Loading…
Reference in New Issue