Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor measurement and printing for future features #302

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions cmake/ExternalMFEM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug|debug|DEBUG")
endif()
endif()

# Replace mfem abort calls with exceptions for testing, default off
set(PALACE_MFEM_USE_EXCEPTIONS CACHE NO "MFEM throw exceptsions instead of abort calls")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set(PALACE_MFEM_USE_EXCEPTIONS CACHE NO BOOL "MFEM throw exceptsions instead of abort calls")
The BOOL is needed to calm a warning about using the cache. However if you do that, the mfem build then fails due to their parsing of the variable, giving

set(MFEM_DEBUG OFF)
set(MFEM_USE_EXCEPTIONS CACHE)
set(MFEM_USE_ZLIB YES)

in the mfem cmake cache. I think sticking with
set(PALACE_MFEM_USE_EXCEPTIONS NO) rather than needing to work around mfem's cmake approach.


set(MFEM_OPTIONS ${PALACE_SUPERBUILD_DEFAULT_ARGS})
list(APPEND MFEM_OPTIONS
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
Expand All @@ -91,6 +94,7 @@ list(APPEND MFEM_OPTIONS
"-DMFEM_USE_METIS_5=YES"
"-DMFEM_USE_CEED=NO"
"-DMFEM_USE_SUNDIALS=${PALACE_WITH_SUNDIALS}"
"-DMFEM_USE_EXCEPTIONS=${PALACE_MFEM_USE_EXCEPTIONS}"
)
if(PALACE_WITH_STRUMPACK OR PALACE_WITH_MUMPS)
list(APPEND MFEM_OPTIONS
Expand Down