diff --git a/CMakeLists.txt b/CMakeLists.txt index b4f6f23c..cbb928fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ SET(HYPRE_DIR "" CACHE STRING "Directory of HYPRE") SET(MUELU_DIR "" CACHE_STRING "Directory of MueLu") SET(METIS_DIR "" CACHE STRING "Directory of metis") SET(MFEM_DIR "" CACHE STRING "Directory of mfem") +SET(MFEM_MESH_DIR "" CACHE STRING "Directory containing MFEM mesh files") SET(PETSC_DIR "" CACHE STRING "Directory of petsc") SET(PTSCOTCH_DIR "" CACHE STRING "Directory of Ptscotch") SET(PARMETIS_DIR "" CACHE STRING "Directory of ParMetis") @@ -160,6 +161,7 @@ if(WITH_MFEM) find_package(Mfem) if (MFEM_FOUND) include_directories(${MFEM_INCLUDE_DIRS}) + message(STATUS "MFEM Mesh Directory: " ${MFEM_MESH_PATH}) else() message(FATAL_ERROR "Cannot find mfem. Try setting MFEM_DIR.") endif(MFEM_FOUND) diff --git a/cmake/FindMfem.cmake b/cmake/FindMfem.cmake index 83073707..ba768597 100644 --- a/cmake/FindMfem.cmake +++ b/cmake/FindMfem.cmake @@ -11,12 +11,14 @@ find_path(MFEM_INCLUDE_DIR mfem.hpp find_path(MFEM_MESH_PATH beam-tet.mesh HINTS ${PC_MFEM_INCLUDEDIR} ${PC_MFEM_INCLUDE_DIRS} ${MFEM_DIR} ${MFEM_DIR}/data ${MFEM_DIR}/../data - $ENV{MFEM_DIR} $ENV{MFEM_DIR}../data $ENV{MFEM_DIR}/../data) + $ENV{MFEM_DIR} $ENV{MFEM_DIR}../data $ENV{MFEM_DIR}/../data + ${MFEM_MESH_DIR} ${MFEM_MESH_DIR}/data + $ENV{MFEM_MESH_DIR} $ENV{MFEM_MESH_DIR}/data) find_library(MFEM_LIBRARY NAMES mfem - HINTS ${PC_MFEM_LIBDIR} ${PC_MFEM_LIBRARY_DIRS} - ${MFEM_DIR} ${MFEM_DIR}/lib - $ENV{MFEM_DIR} $ENV{MFEM_DIR}/lib) + HINTS ${PC_MFEM_LIBDIR} ${PC_MFEM_LIBRARY_DIRS} + ${MFEM_DIR} ${MFEM_DIR}/lib + $ENV{MFEM_DIR} $ENV{MFEM_DIR}/lib) set(MFEM_LIBRARIES ${MFEM_LIBRARY} ) set(MFEM_INCLUDE_DIRS ${MFEM_INCLUDE_DIR} )