mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
added more hints for libraries not found by intel petsc
This commit is contained in:
parent
5c57d9c041
commit
afec47f83d
1 changed files with 28 additions and 0 deletions
|
|
@ -159,6 +159,34 @@ if(petsc)
|
|||
list(INSERT PETSC_PACKAGE_LIBS 0 ${PETSC_FLAPACK_LIB})
|
||||
endif()
|
||||
|
||||
# If libdl wasn't found, search /usr/lib64
|
||||
if(PETSC_DL_LIB STREQUAL "PETSC_DL_LIB-NOTFOUND")
|
||||
find_library(PETSC_DL_LIB libdl.so /usr/lib64)
|
||||
list(REMOVE_ITEM PETSC_PACKAGE_LIBS PETSC_DL_LIB-NOTFOUND)
|
||||
list(INSERT PETSC_PACKAGE_LIBS 0 ${PETSC_DL_LIB})
|
||||
endif()
|
||||
|
||||
# If libm wasn't found, search /usr/lib64
|
||||
if(PETSC_M_LIB STREQUAL "PETSC_M_LIB-NOTFOUND")
|
||||
find_library(PETSC_M_LIB libm.so /usr/lib64)
|
||||
list(REMOVE_ITEM PETSC_PACKAGE_LIBS PETSC_M_LIB-NOTFOUND)
|
||||
list(INSERT PETSC_PACKAGE_LIBS 0 ${PETSC_M_LIB})
|
||||
endif()
|
||||
|
||||
# If libpthread wasn't found, search /usr/lib64
|
||||
if(PETSC_PTHREAD_LIB STREQUAL "PETSC_PTHREAD_LIB-NOTFOUND")
|
||||
find_library(PETSC_PTHREAD_LIB libpthread.so /usr/lib64)
|
||||
list(REMOVE_ITEM PETSC_PACKAGE_LIBS PETSC_PTHREAD_LIB-NOTFOUND)
|
||||
list(INSERT PETSC_PACKAGE_LIBS 0 ${PETSC_PTHREAD_LIB})
|
||||
endif()
|
||||
|
||||
# If librt wasn't found, search /usr/lib64
|
||||
if(PETSC_RT_LIB STREQUAL "PETSC_RT_LIB-NOTFOUND")
|
||||
find_library(PETSC_RT_LIB librt.so /usr/lib64)
|
||||
list(REMOVE_ITEM PETSC_PACKAGE_LIBS PETSC_RT_LIB-NOTFOUND)
|
||||
list(INSERT PETSC_PACKAGE_LIBS 0 ${PETSC_RT_LIB})
|
||||
endif()
|
||||
|
||||
message("-- Using PETSC: ${libpetsc}")
|
||||
add_definitions(-DPETSC)
|
||||
include_directories($ENV{PETSC_DIR}/include)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue