]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfixes: Don't issue warnings in the configuration process,
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Mar 2013 09:45:10 +0000 (09:45 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Mar 2013 09:45:10 +0000 (09:45 +0000)
If an error condition is reached the warning will be now printed together
with the corresponding error message ("Could not find <foo> ...")

git-svn-id: https://svn.dealii.org/branches/branch_cmake@28778 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_hdf5.cmake
deal.II/cmake/configure/configure_metis.cmake
deal.II/cmake/configure/configure_p4est.cmake
deal.II/cmake/configure/configure_petsc.cmake
deal.II/cmake/configure/configure_slepc.cmake
deal.II/cmake/configure/configure_trilinos.cmake
deal.II/cmake/macros/macro_configure_feature.cmake

index ecd91d0514f4e8b679c41ae8486bbbf0d2b56e3a..ff85fe9080d6dc31df4d5d7eb074c9c21504ddcf 100644 (file)
@@ -25,13 +25,15 @@ MACRO(FEATURE_HDF5_FIND_EXTERNAL var)
          (NOT HDF5_WITH_MPI AND NOT DEAL_II_WITH_MPI))
       SET(${var} TRUE)
     ELSE()
-      SET(HDF5_ADDITIONAL_WARNING_STRING
+      MESSAGE(STATUS "Insufficient hdf5 installation found: "
+        "hdf5 has to be configured with the same MPI configuration as deal.II."
+        )
+      SET(HDF5_ADDITIONAL_ERROR_STRING
         "Insufficient hdf5 installation found!\n"
         "hdf5 has to be configured with the same MPI configuration as deal.II, but found:\n"
         "  DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n"
         "  HDF5_WITH_MPI    = ${HDF5_WITH_MPI}\n"
         )
-      MESSAGE(WARNING "\n" ${HDF5_ADDITIONAL_WARNING_STRING} "\n")
     ENDIF()
   ENDIF()
 ENDMACRO()
index 8d6667386dded7477844091a5ceb4282200cb8b1..89b85c6944a07ed3dc69a708344e5f5041f031b7 100644 (file)
@@ -23,13 +23,13 @@ MACRO(FEATURE_METIS_FIND_EXTERNAL var)
     IF(METIS_MAJOR GREATER 4)
       SET(${var} TRUE)
     ELSE()
-      MESSAGE(WARNING "\n"
+      MESSAGE(STATUS "Insufficient metis installation found: "
+        "Version 5.x required!"
         )
-      SET(METIS_ADDITIONAL_WARNING_STRING
+      SET(METIS_ADDITIONAL_ERROR_STRING
         "Could not find a sufficient modern metis installation: "
         "Version 5.x required!\n"
         )
-      MESSAGE(WARNING "\n" ${METIS_ADDITIONAL_WARNING_STRING} "\n")
 
       UNSET(METIS_LIBRARY CACHE)
       UNSET(METIS_INCLUDE_DIR CACHE)
index 2e8ce637f75020fcd560c487b5d5f7abd14b4a04..0cd5c15dbf20074c03e11f9478e9a253269fd198 100644 (file)
@@ -26,11 +26,13 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
     # Check whether p4est supports mpi:
     #
     IF(NOT P4EST_WITH_MPI)
-      SET(HDF5_ADDITIONAL_WARNING_STRING
+      MESSAGE(STATUS "Insufficient p4est installation found: "
+        "p4est has to be configured with MPI enabled."
+        )
+      SET(HDF5_ADDITIONAL_ERROR_STRING
         "Insufficient p4est installation found!\n"
-        "p4est has to be configured with enabled MPI.\n"
+        "p4est has to be configured with MPI enabled.\n"
         )
-      MESSAGE(WARNING "\n" ${P4EST_ADDITIONAL_WARNING_STRING} "\n")
 
       UNSET(P4EST_LIBRARY CACHE)
       UNSET(P4EST_INCLUDE_DIR CACHE)
index 62e8a7660b7ff3c51a90a4fcb2eedbf24b7b032e..b3ae3c07c6605d11cc54545aa6e315d54c7514b1 100644 (file)
@@ -31,11 +31,13 @@ MACRO(FEATURE_PETSC_FIND_EXTERNAL var)
     # We support petsc from version 3.x.x onwards
     #
     IF(PETSC_VERSION_MAJOR LESS 3)
-      SET(PETSC_ADDITIONAL_WARNING_STRING
-        "Could not find a sufficient modern petsc installation: "
+      MESSAGE(STATUS "Could not find a sufficient modern PETSc installation: "
+        "Version >=3.0.0 required!"
+        )
+      SET(PETSC_ADDITIONAL_ERROR_STRING
+        "Could not find a sufficient modern PETSc installation: "
         "Version >=3.0.0 required!\n"
         )
-      MESSAGE(WARNING "\n" ${PETSC_ADDITIONAL_WARNING_STRING} "\n")
       SET(${var} FALSE)
     ENDIF()
 
@@ -50,14 +52,16 @@ MACRO(FEATURE_PETSC_FIND_EXTERNAL var)
     IF( (PETSC_WITH_MPIUNI AND DEAL_II_WITH_MPI)
          OR
          (NOT PETSC_WITH_MPIUNI AND NOT DEAL_II_WITH_MPI))
-      SET(PETSC_ADDITIONAL_WARNING_STRING
-        ${PETSC_ADDITIONAL_WARNING_STRING}
+      MESSAGE(STATUS "Could not find a sufficient modern PETSc installation: "
+        "PETSc has to be configured with the same MPI configuration as deal.II."
+        )
+      SET(PETSC_ADDITIONAL_ERROR_STRING
+        ${PETSC_ADDITIONAL_ERROR_STRING}
         "Could not find a sufficient PETSc installation:\n"
         "PETSc has to be configured with the same MPI configuration as deal.II, but found:\n"
         "  DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n"
         "  PETSC_WITH_MPI   = (NOT ${PETSC_WITH_MPIUNI})\n"
         )
-      MESSAGE(WARNING "\n" ${PETSC_ADDITIONAL_WARNING_STRING} "\n")
       SET(${var} FALSE)
     ENDIF()
 
@@ -102,9 +106,10 @@ ENDMACRO()
 MACRO(FEATURE_PETSC_ERROR_MESSAGE)
   MESSAGE(FATAL_ERROR "\n"
     "Could not find the petsc library!\n"
-    ${PETSC_ADDITIONAL_WARNING_STRING}
-    "\nPlease ensure that the petsc library version 3.0.0 or newer is installed on your computer.\n"
-    "Furthermore PETSc has to be configured with the same mpi options as deal.II.\n"
+    ${PETSC_ADDITIONAL_ERROR_STRING}
+    "\nPlease ensure that the petsc library version 3.0.0 or newer is "
+    "installed on your computer and is configured with the same mpi options "
+    "as deal.II\n"
     "If the library is not at a default location, either provide some hints\n"
     "for the autodetection:\n"
     "PETSc installed with --prefix=<...> to a destination:\n"
index e7b5f60adbc43e95e68f0774806a3f68a5950322..381d7b534dff4b9c1f232fc623752bacde7b07ca 100644 (file)
@@ -29,11 +29,13 @@ MACRO(FEATURE_SLEPC_FIND_EXTERNAL var)
       SET(${var} TRUE)
     ELSE()
 
-      SET(SLEPC_ADDITIONAL_WARNING_STRING
+      MESSAGE(STATUS "Could not find a sufficient SLEPc installation: "
+        "The SLEPc library must have the same version as the PETSc library."
+        )
+      SET(SLEPC_ADDITIONAL_ERROR_STRING
         "Could not find a sufficient SLEPc installation: "
         "The SLEPc library must have the same version as the PETSc library.\n"
         )
-      MESSAGE(WARNING "\n" ${SLEPC_ADDITIONAL_WARNING_STRING} "\n")
 
       UNSET(SLEPC_INCLUDE_DIR_ARCH CACHE)
       UNSET(SLEPC_INCLUDE_DIR_COMMON CACHE)
@@ -63,7 +65,7 @@ ENDMACRO()
 MACRO(FEATURE_SLEPC_ERROR_MESSAGE)
   MESSAGE(FATAL_ERROR "\n"
     "Could not find the SLEPc library!\n"
-    ${SLEPC_ADDITIONAL_WARNING_STRING}
+    ${SLEPC_ADDITIONAL_ERROR_STRING}
     "Please ensure that the SLEPc library version 3.0.0 or newer is installed on your computer\n"
     "and the version is the same as the one of the installed PETSc library.\n"
     "If the library is not at a default location, either provide some hints\n"
index b1a93e5ea7b15b2f3b166d58a3f97b68857ef347..996beab5e40b0e017488495330c93b5d7e21ca49 100644 (file)
@@ -48,7 +48,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     ENDFOREACH()
 
     IF(NOT ${var})
-      SET(TRILINOS_ADDITIONAL_WARNING_STRING
+      SET(TRILINOS_ADDITIONAL_ERROR_STRING
         "The Trilinos installation found at\n"
         "  ${TRILINOS_DIR}\n"
         "is missing one or more modules necessary for the deal.II Trilinos interfaces:\n"
@@ -56,7 +56,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
         "Please re-install Trilinos with the missing Trilinos subpackages
         enabled.\n\n"
         )
-      MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_WARNING_STRING} "\n")
+      MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_ERROR_STRING} "\n")
     ENDIF()
 
     #
@@ -75,15 +75,15 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
         TRILINOS_VERSION_MINOR EQUAL 8 AND
         TRILINOS_VERSION_SUBMINOR LESS 2))
 
-      SET(TRILINOS_ADDITIONAL_WARNING_STRING
-        ${TRILINOS_ADDITIONAL_WARNING_STRING}
+      SET(TRILINOS_ADDITIONAL_ERROR_STRING
+        ${TRILINOS_ADDITIONAL_ERROR_STRING}
         "The Trilinos installation found at\n"
         "  ${TRILINOS_DIR}\n"
         "with version ${TRILINOS_VERSION_MAJOR}.${TRILINOS_VERSION_MINOR}.${TRILINOS_VERSION_SUBMINOR} has bugs that make\n"
         "it incompatible with deal.II. Please use versions before 10.6 or after\n"
         "10.8.1.\n\n"
         )
-      MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_WARNING_STRING} "\n")
+      MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_ERROR_STRING} "\n")
       SET(${var} FALSE)
     ENDIF()
 
@@ -94,15 +94,15 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     IF( (TRILINOS_WITH_MPI AND NOT DEAL_II_WITH_MPI)
          OR
          (NOT TRILINOS_WITH_MPI AND DEAL_II_WITH_MPI))
-      SET(TRILINOS_ADDITIONAL_WARNING_STRING
-        ${TRILINOS_ADDITIONAL_WARNING_STRING}
+      SET(TRILINOS_ADDITIONAL_ERROR_STRING
+        ${TRILINOS_ADDITIONAL_ERROR_STRING}
         "The Trilinos installation found at\n"
         "  ${TRILINOS_DIR}\n"
         "has to be configured with the same MPI configuration as deal.II, but found:\n"
         "  DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n"
         "  TRILINOS_WITH_MPI = ${TRILINOS_WITH_MPI}\n"
         )
-      MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_WARNING_STRING} "\n")
+      MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_ERROR_STRING} "\n")
       SET(${var} FALSE)
     ENDIF()
 
@@ -138,14 +138,14 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
         LIST(APPEND DEAL_II_DEFINITIONS "HAS_C99_TR1_CMATH")
         LIST(APPEND DEAL_II_USER_DEFINITIONS "HAS_C99_TR1_CMATH")
       ELSE()
-        SET(TRILINOS_ADDITIONAL_WARNING_STRING
-          ${TRILINOS_ADDITIONAL_WARNING_STRING}
+        SET(TRILINOS_ADDITIONAL_ERROR_STRING
+          ${TRILINOS_ADDITIONAL_ERROR_STRING}
           "The Trilinos installation found at\n"
           "  ${TRILINOS_DIR}\n"
           "is not compatible with the C++ standard selected for\n"
           "this compiler. See the deal.II FAQ page for a solution.\n\n"
           )
-        MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_WARNING_STRING} "\n")
+        MESSAGE(WARNING "\n" ${TRILINOS_ADDITIONAL_ERROR_STRING} "\n")
         SET(${var} FALSE)
       ENDIF()
     ENDIF()
@@ -200,18 +200,4 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL)
 ENDMACRO()
 
 
-MACRO(FEATURE_TRILINOS_ERROR_MESSAGE)
-  MESSAGE(FATAL_ERROR "\n"
-    "Could not find a suitable set of trilinos libraries!\n"
-    ${TRILINOS_ADDITIONAL_WARNING_STRING}
-    "Please ensure that a suitable set of trilinos 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"
-    "    $ TRILINOS_DIR=\"...\" cmake <...>\n"
-    "    $ cmake -DTRILINOS_DIR=\"...\" <...>\n"
-    "or set the relevant variables by hand in ccmake.\n\n"
-    )
-ENDMACRO()
-
-
 CONFIGURE_FEATURE(TRILINOS)
index 5b6a606013050b9530081d69a080eca50f381efb..991531e19b03ea7d9d992e39d76a9ff6f259b58c 100644 (file)
@@ -113,7 +113,7 @@ ${_feature_lowercase} by setting DEAL_II_ALLOW_BUNDLED=on or\nDEAL_II_FORCE_BUND
 
   MESSAGE(FATAL_ERROR "\n"
     "Could not find the ${_feature_lowercase} library!\n"
-    ${${_feature}_ADDITIONAL_WARNING_STRING}
+    ${${_feature}_ADDITIONAL_ERROR_STRING}
     "Please ensure that a suitable ${_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}"

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.