#
# Now, set the project and set up the rest:
#
-PROJECT(deal.II)
+PROJECT(deal.II CXX C)
INCLUDE(setup_deal_ii)
INCLUDE(setup_compiler_flags)
#
MACRO(FEATURE_MPI_FIND_EXTERNAL var)
+ #
+ # Enable Fortran support so that MPI_Fortran_LIBRARIES is set up.
+ #
+ IF(NOT CMAKE_Fortran_COMPILER_WORKS)
+ ENABLE_LANGUAGE(Fortran OPTIONAL)
+ ENDIF()
+
#
# Obey a manual user override: If MPI_CXX_FOUND is set to true in the
# cache, we skip the FIND_PACKAGE calls:
SET_IF_EMPTY(METIS_DIR "$ENV{METIS_DIR}")
#
-# TODO: Metis is usually pretty self contained. So no external dependencies
+# Metis is usually pretty self contained. So no external dependencies
# so far... But there could be dependencies on pcre and mpi...
#
+# Link in MPI unconditionally (if found)
+#
FIND_PATH(METIS_INCLUDE_DIR metis.h
HINTS
IF(METIS_FOUND)
SET(METIS_LIBRARIES
${METIS_LIBRARY}
- ${MPI_CXX_LIBRARIES} # for good measure
+ ${MPI_C_LIBRARIES} # for good measure
)
SET(METIS_INCLUDE_DIRS ${METIS_INCLUDE_DIR})
${MUMPS_COMMON_LIBRARY}
${PORD_LIBRARY}
${SCALAPACK_LIBRARIES}
- ${MPI_CXX_LIBRARIES} # For good measure
+ ${MPI_Fortran_LIBRARIES} # For good measure
)
SET(MUMPS_LINKER_FLAGS
${SCALAPACK_LINKER_FLAGS}
SET(P4EST_LIBRARIES
${P4EST_LIBRARY}
${SC_LIBRARY}
- ${MPI_CXX_LIBRARIES} # for good measure
+ ${MPI_C_LIBRARIES} # for good measure
)
SET(P4EST_INCLUDE_DIRS
${P4EST_INCLUDE_DIR}
# now.
#
FIND_PACKAGE(LAPACK)
+FIND_PACKAGE(METIS)
#
# Two macros to make life easier:
${CAMD_LIBRARY}
${AMD_LIBRARY}
${SuiteSparse_config_LIBRARY}
- ${METIS_LIBRARIES} # for good measure
- ${LAPACK_LIBRARIES}
)
+ #
+ # For good measure:
+ #
+ IF(METIS_FOUND)
+ LIST(APPEND UMFPACK_LIBRARIES ${METIS_LIBRARIES})
+ ENDIF()
+
+ LIST(APPEND UMFPACK_LIBRARIES ${LAPACK_LIBRARIES})
+
#
# Add rt to the link interface as well (for whatever reason,
# libsuitesparse.so depends on clock_gettime but the shared