Skip to content

Commit

Permalink
Updated cmakelists for finding mfem
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanda Bienz committed Feb 20, 2019
1 parent 17fcf80 commit 536a437
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 6 additions & 4 deletions cmake/FindMfem.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down

0 comments on commit 536a437

Please sign in to comment.