Commit 12a33391 authored by Florent Pruvost's avatar Florent Pruvost

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

parent 7ee54293
......@@ -615,6 +615,12 @@ if(PASTIX_LIBRARIES)
endforeach()
list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}")
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
list(APPEND REQUIRED_LIBS ${PASTIX_EXTRA_LIBRARIES})
......
......@@ -264,6 +264,10 @@ if(PTSCOTCH_LIBRARIES)
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
endif()
if(UNIX OR WIN32)
list(APPEND REQUIRED_LIBS "-lm")
endif()
list(APPEND REQUIRED_LIBS "-lz -lrt")
# set required libraries for link
set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")
......
......@@ -233,6 +233,10 @@ if(SCOTCH_LIBRARIES)
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
endif()
if(UNIX OR WIN32)
list(APPEND REQUIRED_LIBS "-lm")
endif()
list(APPEND REQUIRED_LIBS "-lz -lrt")
# set required libraries for link
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