MACRO(FEATURE_MUMPS_CONFIGURE_EXTERNAL var)
INCLUDE_DIRECTORIES(${MUMPS_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MUMPS_LIBRARIES})
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
+ ${MUMPS_LIBRARIES}
+ ${MPI_CXX_LIBRARIES} # for good measure
+ )
ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${MUMPS_LINKER_FLAGS}")
SET(DEAL_II_USE_MUMPS TRUE)
#
# TODO: mumps might link to scotch and or metis as well. Ignore this for
# now. :-]
-# TODO: libpord.a ?
#
FIND_PATH(MUMPS_INCLUDE_DIRS dmumps_c.h
${LAPACK_LIBRARIES}
)
+#
+# If we can find libport.a (or similiar), link it in as well:
+#
+FIND_LIBRARY(PORD_LIBRARY
+ NAMES port
+ HINTS
+ ${MUMPS_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+ )
+IF(NOT PORD_LIBRARY MATCHES "-NOTFOUND")
+ LIST(APPEND MUMPS_LIBRARIES
+ ${PORD_LIBRARY}
+ )
+ENDIF()
+
SET(MUMPS_LINKER_FLAGS
${LAPACK_LINKER_FLAGS}
)
DMUMPS_LIBRARY
MUMPS_COMMON_LIBRARY
MUMPS_INCLUDE_DIRS
+ PORT_LIBRARY
)
ENDIF()
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams