#####
#
-# Configuration for the netcdf library:
+# Configuration for the hdf5 library:
#
-MACRO(FEATURE_HDF5_ERROR_MESSAGE)
- MESSAGE(FATAL_ERROR "\n"
- "Could not find the hdf5 library!\n"
- "Please ensure that the hdf5 library is installed on your computer.\n"
- "If the library is not at a default location, either provide some hints\n"
- "for the autodetection:\n"
- " $ HDF5_DIR=\"...\" cmake <...>\n"
- " $ cmake -DHDF5_DIR=\"...\" <...>\n"
- "or set the relevant variables by hand in ccmake.\n\n"
- )
-ENDMACRO()
-
CONFIGURE_FEATURE(HDF5)
# Configuration for the netcdf library:
#
-
MACRO(FEATURE_METIS_FIND_EXTERNAL var)
FIND_PACKAGE(METIS)
UNSET(METIS_INCLUDE_DIR CACHE)
UNSET(METIS_DIR CACHE)
UNSET(METIS_FOUND CACHE)
+ SET(METIS_DIR "" CACHE STRING
+ "An optional hint to a metis directory"
+ )
ENDIF()
ENDIF()
ENDMACRO()
-
-MACRO(FEATURE_METIS_ERROR_MESSAGE)
- MESSAGE(FATAL_ERROR "\n"
- "Could not find the metis library!\n"
- "Please ensure that the metis library version 5.0 or newer is installed on your computer.\n"
- "If the library is not at a default location, either provide some hints\n"
- "for the autodetection:\n"
- " $ METIS_DIR=\"...\" cmake <...>\n"
- " $ cmake -DMETIS_DIR=\"...\" <...>\n"
- "or set the relevant variables by hand in ccmake.\n\n"
- )
-ENDMACRO()
-
-
CONFIGURE_FEATURE(METIS)
SET(FEATURE_MUMPS_DEPENDS DEAL_II_WITH_MPI)
-
-MACRO(FEATURE_MUMPS_ERROR_MESSAGE)
- MESSAGE(FATAL_ERROR "\n"
- "Could not find the mumps library!\n"
- "Please ensure that the library is installed on your computer.\n"
- "If the libraries is not at a default location, either provide some hints\n"
- "for the autodetection:\n"
- " $ MUMPS_DIR=\"...\" cmake <...>\n"
- " $ cmake -DMUMPS_DIR=\"...\" <...>\n"
- "or set the relevant variables by hand in ccmake.\n"
- "Relevant hints for MUMPS are MUMPS_DIR, SCALAPACK_DIR (and BLACS_DIR).\n\n"
- )
-ENDMACRO()
-
-
CONFIGURE_FEATURE(MUMPS)
# Configuration for the p4est and sc libraries:
#
-
SET(FEATURE_P4EST_DEPENDS DEAL_II_WITH_MPI)
-
MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
FIND_PACKAGE(P4EST)
ENDIF()
ENDMACRO()
-
-MACRO(FEATURE_P4EST_ERROR_MESSAGE)
- MESSAGE(FATAL_ERROR "\n"
- "Could not find the p4est and sc libraries!\n"
- "Please ensure that the libraries are installed on your computer.\n"
- "If the libraries are not at a default location, either provide some hints\n"
- "for the autodetection:\n"
- " $ P4EST_DIR=\"...\" cmake <...>\n"
- " $ cmake -DP4EST_DIR=\"...\" <...>\n"
- "or set the relevant variables by hand in ccmake.\n"
- )
-ENDMACRO()
-
-
CONFIGURE_FEATURE(P4EST)
# Configuration for the SLEPC library:
#
-
SET(FEATURE_SLEPC_DEPENDS DEAL_II_WITH_PETSC)
-
MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
FIND_PACKAGE(SLEPC)
SET(${var} FALSE)
ENDIF()
ENDIF()
-
ENDMACRO()
# The user has to know the location of the SLEPC headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${SLEPC_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
- ${SLEPC_LIBRARIES}
- )
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${SLEPC_LIBRARIES})
ENDMACRO()
#
SET(FEATURE_UMFPACK_DEPENDS DEAL_II_WITH_LAPACK)
-
MACRO(FEATURE_UMFPACK_CONFIGURE_BUNDLED)
INCLUDE_DIRECTORIES(
${UMFPACK_FOLDER}/UMFPACK/Include
)
ENDMACRO()
-
MACRO(FEATURE_UMFPACK_ERROR_MESSAGE)
MESSAGE(FATAL_ERROR "\n"
- "Could not find the umfpack and amd libraries!\n"
+ "Could not find umfpack and supporting libraries!\n"
"Please ensure that the libraries are installed on your computer.\n"
"If the libraries are not at a default location, either provide some hints\n"
"for the autodetection:\n"
)
ENDMACRO()
-
CONFIGURE_FEATURE(UMFPACK)
#
MACRO(FEATURE_ERROR_MESSAGE _feature)
STRING(TOLOWER ${_feature} _feature_lowercase)
- IF(FEATURE_${_feature}_HAVE_BUNDLED)
- MESSAGE(FATAL_ERROR "\n"
- "Could not find the ${_feature_lowercase} library!\n\n"
- "Please ensure that the ${_feature_lowercase} library is installed on your computer.\n"
- "If the library is not at a default location, either provide some hints\n"
- "for the autodetection, or set the relevant variables by hand in ccmake.\n\n"
- "Alternatively you may choose to compile the bundled library of\n"
- "${_feature_lowercase} by setting DEAL_II_ALLOW_BUNDLED=on or\n"
- "DEAL_II_FORCE_BUNDLED_${_feature}=on.\n\n"
+
+ IF(DEFINED ${_feature}_DIR)
+ SET(_hint_snippet "
+ $ ${_feature}_DIR=\"...\" cmake <...>
+ $ cmake -D${_feature}_DIR=\"...\" <...>
+or set the relevant variables by hand in ccmake."
)
- ELSE()
- MESSAGE(FATAL_ERROR "\n"
- "Could not find the ${_feature_lowercase} library!\n\n"
- "Please ensure that the ${_feature_lowercase} library is installed on your computer.\n"
- "If the library is not at a default location, either provide some hints\n"
- "for the autodetection, or set the relevant variables by hand in ccmake.\n\n"
+ ELSE()
+ SET(_hint_snippet
+ "or set the relevant variables by hand in ccmake."
)
ENDIF()
+
+ IF(FEATURE_${_feature}_HAVE_BUNDLED)
+ SET(_bundled_snippet
+ "\n\nAlternatively you may choose to compile the bundled library of
+${_feature_lowercase} by setting DEAL_II_ALLOW_BUNDLED=on or\nDEAL_II_FORCE_BUNDLED_${_feature}=on.\n"
+ )
+ ELSE()
+ SET(_bundled_snippet "\n")
+ ENDIF()
+
+ MESSAGE(FATAL_ERROR "\n"
+ "Could not find the ${_feature_lowercase} library!\n"
+ "Please ensure that the ${_feature_lowercase} library is installed on your computer.\n"
+ "If the library is not at a default location, either provide some hints\n"
+ "for autodetection,${_hint_snippet}${_bundled_snippet}"
+ )
ENDMACRO()