Commit 062ec172 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

add dependencies when test functions in Finds pastix, (pt)scotch

parent 4474dea7
...@@ -615,6 +615,12 @@ if(PASTIX_LIBRARIES) ...@@ -615,6 +615,12 @@ if(PASTIX_LIBRARIES)
endforeach() endforeach()
list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}") list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}")
endif() endif()
# Fortran
if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*")
list(APPEND REQUIRED_LIBS "-lgfortran")
elseif (CMAKE_Fortran_COMPILER MATCHES ".+ifort.*")
list(APPEND REQUIRED_LIBS "-lifcore")
endif()
# EXTRA LIBS such that pthread, m, rt # EXTRA LIBS such that pthread, m, rt
list(APPEND REQUIRED_LIBS ${PASTIX_EXTRA_LIBRARIES}) list(APPEND REQUIRED_LIBS ${PASTIX_EXTRA_LIBRARIES})
......
...@@ -264,6 +264,10 @@ if(PTSCOTCH_LIBRARIES) ...@@ -264,6 +264,10 @@ if(PTSCOTCH_LIBRARIES)
if(CMAKE_THREAD_LIBS_INIT) if(CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}") list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
endif() endif()
if(UNIX OR WIN32)
list(APPEND REQUIRED_LIBS "-lm")
endif()
list(APPEND REQUIRED_LIBS "-lz -lrt")
# set required libraries for link # set required libraries for link
set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}") set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")
......
...@@ -233,6 +233,10 @@ if(SCOTCH_LIBRARIES) ...@@ -233,6 +233,10 @@ if(SCOTCH_LIBRARIES)
if(CMAKE_THREAD_LIBS_INIT) if(CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}") list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
endif() endif()
if(UNIX OR WIN32)
list(APPEND REQUIRED_LIBS "-lm")
endif()
list(APPEND REQUIRED_LIBS "-lz -lrt")
# set required libraries for link # set required libraries for link
set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}") set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")
......
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