#
-SET(FEATURE_P4EST_DEPENDS
- DEAL_II_WITH_MPI
- )
+SET(FEATURE_P4EST_DEPENDS DEAL_II_WITH_MPI)
MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
FIND_PACKAGE(P4EST)
- FIND_PACKAGE(SC)
- IF(P4EST_FOUND AND SC_FOUND)
+ IF(P4EST_FOUND)
#
# Check whether p4est supports mpi:
#
MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL var)
- INCLUDE_DIRECTORIES(${P4EST_INCLUDE_DIR} ${SC_INCLUDE_DIR})
- # The user has to know the location of the p4est headers as well:
- LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIR} ${SC_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${P4EST_INCLUDE_DIRS})
- IF (CMAKE_BUILD_TYPE MATCHES "Debug")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
- ${P4EST_LIBRARY} ${SC_LIBRARY}
- )
- ENDIF()
+ # The user has to know the location of the p4est headers as well:
+ LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIRS})
- IF (CMAKE_BUILD_TYPE MATCHES "Release")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE
- ${P4EST_LIBRARY} ${SC_LIBRARY}
- )
- ENDIF()
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${P4EST_LIBRARIES})
SET(DEAL_II_USE_P4EST TRUE)
+++ /dev/null
-#
-# Try to find the BLACS library
-#
-# This module exports
-#
-
-INCLUDE(FindPackageHandleStandardArgs)
-
#
-# Try to find the METIS library
+# Try to find the (serial) METIS library
#
INCLUDE(FindPackageHandleStandardArgs)
SET_IF_EMPTY(METIS_DIR "$ENV{METIS_DIR}")
+#
+# Metis (at least up to version 4.*) is usually pretty self contained. So
+# no external dependencies so far.
+#
+# TODO: What about metis-5.* (e.g. coming from parmetis) This could have
+# deps on pcre and mpi...
+#
+
FIND_PATH(METIS_INCLUDE_DIR metis.h
HINTS
${METIS_DIR}
FIND_PATH(NETCDF_INCLUDE_DIR netcdf.hh
)
+#
+# TODO: netcdf might externally depend on hdf5. Check and fix this.
+#
+
FIND_LIBRARY(NETCDF_LIBRARY
NAMES netcdf_c++ netcdf_cpp
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
#
# Try to find the P4EST library
#
+# This module exports:
+# P4EST_LIBRARIES
+# P4EST_INCLUDE_DIRS
+# P4EST_WITH_MPI
+#
INCLUDE(FindPackageHandleStandardArgs)
SET_IF_EMPTY(P4EST_DIR "$ENV{P4EST_DIR}")
+#
+# Search for the sc library, usually bundled with p4est:
+#
+FIND_PACKAGE(SC)
+
FIND_PATH(P4EST_INCLUDE_DIR p4est.h
HINTS
${P4EST_DIR}
lib${LIB_SUFFIX} lib64 lib src
)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG P4EST_LIBRARY P4EST_INCLUDE_DIR)
+SET(P4EST_LIBRARIES
+ ${P4EST_LIBRARIES}
+ ${SC_LIBRARIES}
+ )
+
+SET(P4EST_INCLUDE_DIRS
+ ${P4EST_INCLUDE_DIR}
+ ${SC_INCLUDE_DIR}
+ )
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG
+ P4EST_LIBRARIES
+ P4EST_INCLUDE_DIRS
+ )
IF(P4EST_FOUND)
+#
# Try to find SC
+#
INCLUDE(FindPackageHandleStandardArgs)
#
# TRILINOS_DIR
# TRILINOS_INCLUDE_DIRS
-# TRILINOS_LIBRARY_*
# TRILINOS_LIBRARIES
# TRILINOS_VERSION_MAJOR
# TRILINOS_VERSION_MINOR
FIND_LIBRARY(TRILINOS_LIBRARY_${library}
NAMES ${library}
HINTS ${Trilinos_LIBRARY_DIRS}
+ NO_DEFAULT_PATH
+ NO_CMAKE_ENVIRONMENT_PATH
+ NO_CMAKE_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ NO_CMAKE_SYSTEM_PATH
+ NO_CMAKE_FIND_ROOT_PATH
)
LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${library}})
${UMFPACK_DIR}
PATH_SUFFIXES
umfpack include/umfpack include Include UMFPACK/Include ../UMFPACK/Include
-)
+ )
FIND_LIBRARY(UMFPACK_LIBRARY
NAMES umfpack
${UMFPACK_DIR}
PATH_SUFFIXES
lib${LIB_SUFFIX} lib64 lib Lib UMFPACK/Lib ../UMFPACK/Lib
-)
+ )
SET(UMFPACK_LIBRARIES
${UMFPACK_LIBRARY}