]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Unify error messages
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Feb 2013 00:26:37 +0000 (00:26 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Feb 2013 00:26:37 +0000 (00:26 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@28629 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_hdf5.cmake
deal.II/cmake/configure/configure_metis.cmake
deal.II/cmake/configure/configure_mumps.cmake
deal.II/cmake/configure/configure_p4est.cmake
deal.II/cmake/configure/configure_slepc.cmake
deal.II/cmake/configure/configure_umfpack.cmake
deal.II/cmake/macros/macro_configure_feature.cmake

index 5895c6c3e7cf6afc55353b373e4b50093d70eda4..68bc1d036034c26c610d88acc1a96375a1a65820 100644 (file)
 #####
 
 #
-# 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)
index 856fd48a75fe8a997b0482ef51d630c41e8a030f..332d61dcb22adfbca96a110a6c56529d71c968e5 100644 (file)
@@ -16,7 +16,6 @@
 # Configuration for the netcdf library:
 #
 
-
 MACRO(FEATURE_METIS_FIND_EXTERNAL var)
   FIND_PACKAGE(METIS)
 
@@ -32,22 +31,11 @@ MACRO(FEATURE_METIS_FIND_EXTERNAL var)
       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)
index 2401ca0ac3b3f2fb98ef78f5daf2d2fcac25ed04..7f08a07ea59af53e9c8192a2bb23e23261efb106 100644 (file)
 
 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)
index 5da63d925974931a115528cfb0f9b9939fcacdc3..49e595e38d4d57d75d3932dbcd6c6d44118414e7 100644 (file)
 # Configuration for the p4est and sc libraries:
 #
 
-
 SET(FEATURE_P4EST_DEPENDS DEAL_II_WITH_MPI)
 
-
 MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
   FIND_PACKAGE(P4EST)
 
@@ -38,18 +36,4 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
   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)
index a98af1590a45ea9fad92cdfa3f64f9e7aba372c4..b431cce9bfed4da2cd704d62fbb9a836db4e702b 100644 (file)
 # Configuration for the SLEPC library:
 #
 
-
 SET(FEATURE_SLEPC_DEPENDS DEAL_II_WITH_PETSC)
 
-
 MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
   FIND_PACKAGE(SLEPC)
 
@@ -43,7 +41,6 @@ MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
       SET(${var} FALSE)
     ENDIF()
   ENDIF()
-
 ENDMACRO()
 
 
@@ -53,9 +50,7 @@ MACRO(FEATURE_SLEPC_CONFIGURE_EXTERNAL)
   # 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()
 
 
index 2865357f956c6735464a0e22611944aeb4b7b3ad..f3de32386eaf3ae45904b95cf4319e901e55bd97 100644 (file)
@@ -22,7 +22,6 @@
 #
 SET(FEATURE_UMFPACK_DEPENDS DEAL_II_WITH_LAPACK)
 
-
 MACRO(FEATURE_UMFPACK_CONFIGURE_BUNDLED)
   INCLUDE_DIRECTORIES(
     ${UMFPACK_FOLDER}/UMFPACK/Include
@@ -30,10 +29,9 @@ MACRO(FEATURE_UMFPACK_CONFIGURE_BUNDLED)
     )
 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"
@@ -48,5 +46,4 @@ MACRO(FEATURE_UMFPACK_ERROR_MESSAGE)
     )
 ENDMACRO()
 
-
 CONFIGURE_FEATURE(UMFPACK)
index f80a79994d95dbacb86cc1b298def5205ee535e1..2ac56119736da74d5483c875b557da55ec6bab37 100644 (file)
@@ -91,24 +91,34 @@ ENDMACRO()
 #
 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()
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.