--- /dev/null
+#####
+##
+## Copyright (C) 2012 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## <TODO: Full License information>
+## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
+## version of the LGPL license.
+##
+## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
+##
+#####
+
+#
+# Configuration for the MUMPS library:
+#
+
+OPTION(DEAL_II_WITH_MUMPS
+ "Build deal.II with support for MUMPS."
+ OFF)
+
+SET(FEATURE_MUMPS_DEPENDS DEAL_II_WITH_MPI)
+
+
+MACRO(FEATURE_MUMPS_FIND_EXTERNAL var)
+ FIND_PACKAGE(MUMPS)
+
+ IF(MUMPS_FOUND)
+ SET(${var} TRUE)
+ ENDIF()
+ENDMACRO()
+
+
+MACRO(FEATURE_MUMPS_CONFIGURE_EXTERNAL var)
+
+ INCLUDE_DIRECTORIES(${MUMPS_INCLUDE_DIRS})
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MUMPS_LIBRARIES})
+ ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${MUMPS_LINKER_FLAGS}")
+
+ SET(DEAL_II_USE_MUMPS TRUE)
+
+ SET(${var} TRUE)
+ENDMACRO()
+
+
+CONFIGURE_FEATURE(MUMPS)
+
--- /dev/null
+#####
+##
+## Copyright (C) 2012 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## <TODO: Full License information>
+## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
+## version of the LGPL license.
+##
+## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
+##
+#####
+
+#
+# Try to find the MUMPS library
+#
+# This module exports
+#
+# MUMPS_INCLUDE_DIRS
+# MUMPS_LIBRARIES
+# MUMPS_LINKER_FLAGS
+#
+
+SET_IF_EMPTY(MUMPS_DIR "$ENV{MUMPS_DIR}")
+
+INCLUDE(FindPackageHandleStandardArgs)
+
+#
+# Search for all known dependencies of MUMPS:
+# (We'll rely on the user of FindMUMPS, setting up mpi *cough*)
+#
+FIND_PACKAGE(SCALAPACK) # which will also include lapack and blas
+
+#
+# TODO: libpord.a ?
+#
+
+FIND_PATH(MUMPS_INCLUDE_DIRS dmumps_c.h
+ HINTS
+ ${MUMPS_DIR}
+ PATH_SUFFIXES
+ mumps include/mumps include
+ )
+
+FIND_LIBRARY(DMUMPS_LIBRARY
+ NAMES dmumps
+ HINTS
+ ${MUMPS_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+ )
+
+FIND_LIBRARY(MUMPS_COMMON_LIBRARY
+ NAMES mumps_common
+ HINTS
+ ${MUMPS_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+ )
+
+SET(MUMPS_LIBRARIES
+ ${DMUMPS_LIBRARY}
+ ${MUMPS_COMMON_LIBRARY}
+ ${LAPACK_LIBRARIES}
+ )
+
+SET(MUMPS_LINKER_FLAGS
+ ${LAPACK_LINKER_FLAGS}
+ )
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUMPS DEFAULT_MSG
+ DMUMPS_LIBRARY
+ MUMPS_COMMON_LIBRARY
+ LAPACK_FOUND
+ )
+
+IF(MUMPS_FOUND)
+ MARK_AS_ADVANCED(
+ DMUMPS_LIBRARY
+ MUMPS_COMMON_LIBRARY
+ MUMPS_INCLUDE_DIRS
+ )
+ENDIF()
+
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG
- SC_FOUND
P4EST_LIBRARY
P4EST_INCLUDE_DIR
+ SC_FOUND
)
IF(P4EST_FOUND)
--- /dev/null
+#####
+##
+## Copyright (C) 2012 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## <TODO: Full License information>
+## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
+## version of the LGPL license.
+##
+## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
+##
+#####
+
+#
+# Try to find the SCALAPACK library
+#
+# Used as a helper module for FindMUMPS.cmake
+#
+# This module exports
+#
+# SCALAPACK_LIBRARIES
+# SCALAPACK_LINKER_FLAGS
+#
+
+SET_IF_EMPTY(SCALAPCK_DIR "$ENV{SCALAPACK_DIR}")
+SET_IF_EMPTY(BLACS_DIR "$ENV{BLACS_DIR}")
+
+INCLUDE(FindPackageHandleStandardArgs)
+
+#
+# SCALAPACK needs LAPACK and BLAS as dependency, search for them with the help
+# of the LAPACK find module:
+#
+# TODO: SCALAPACK and mpi...
+#
+FIND_PACKAGE(LAPACK)
+
+FIND_LIBRARY(SCALAPACK_LIBRARY
+ NAMES scalapack
+ HINTS
+ ${SCALAPACK_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+)
+
+SET(SCALAPACK_LIBRARIES
+ ${SCALAPACK_LIBRARY}
+ ${LAPACK_LIBRARIES}
+ )
+
+SET(SCALAPACK_LINKER_FLAGS
+ ${LAPACK_LINKER_FLAGS}
+ )
+
+#
+# Well, depending on the version of scalapack and the distribution it might
+# be necessary to search for blacs, too. So we do this in a very
+# probabilistic way...
+#
+FIND_LIBRARY(BLACS_LIBRARY
+ NAMES blacs
+ ${BLACS_DIR}
+ ${SCALAPACK_DIR}
+ ${SCALAPACK_DIR}/../blacs/
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+)
+
+IF(NOT BLACS_LIBRARY MATCHES "-NOTFOUND")
+ LIST(APPEND SCLAPACK_LIBRARIES
+ ${BLACS_LIBRARY}
+ )
+ENDIF()
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCALAPACK DEFAULT_MSG
+ SCALAPACK_LIBRARY
+ LAPACK_FOUND
+ )
+
+IF(SCALAPACK_FOUND)
+ MARK_AS_ADVANCED(
+ lapack_LIBRARY
+ atlas_LIBRARY
+ blas_LIBRARY
+ SCALAPACK_LIBRARY
+ BLACS_LIBRARY
+ )
+ENDIF()
+
#cmakedefine DEAL_II_COMPILER_SUPPORTS_MPI
+/*****************************************
+ * Configured in configure_mumps.cmake: *
+ *****************************************/
+
+/* Defined if an MUMPS installation was found and is going to be used */
+#cmakedefine DEAL_II_USE_MUMPS
+
+
/*****************************************
* Configured in configure_netcdf.cmake: *
*****************************************/
this bug. */
#cmakedefine DEAL_II_TEMPL_SPEC_FRIEND_BUG
-/* Defined if a MUMPS installation was found and is going to be used */
-#cmakedefine DEAL_II_USE_MUMPS
-
/* Defined if a SLEPc installation was found and is going to be used */
#cmakedefine DEAL_II_USE_SLEPC