From: maier Date: Thu, 7 Mar 2013 09:45:10 +0000 (+0000) Subject: Bugfixes: Don't issue warnings in the configuration process, X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6568ee3db6212e7e4a66a8b1fe4764c60220d4ce;p=dealii-svn.git Bugfixes: Don't issue warnings in the configuration process, If an error condition is reached the warning will be now printed together with the corresponding error message ("Could not find ...") git-svn-id: https://svn.dealii.org/branches/branch_cmake@28778 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_hdf5.cmake b/deal.II/cmake/configure/configure_hdf5.cmake index ecd91d0514..ff85fe9080 100644 --- a/deal.II/cmake/configure/configure_hdf5.cmake +++ b/deal.II/cmake/configure/configure_hdf5.cmake @@ -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() diff --git a/deal.II/cmake/configure/configure_metis.cmake b/deal.II/cmake/configure/configure_metis.cmake index 8d6667386d..89b85c6944 100644 --- a/deal.II/cmake/configure/configure_metis.cmake +++ b/deal.II/cmake/configure/configure_metis.cmake @@ -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) diff --git a/deal.II/cmake/configure/configure_p4est.cmake b/deal.II/cmake/configure/configure_p4est.cmake index 2e8ce637f7..0cd5c15dbf 100644 --- a/deal.II/cmake/configure/configure_p4est.cmake +++ b/deal.II/cmake/configure/configure_p4est.cmake @@ -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) diff --git a/deal.II/cmake/configure/configure_petsc.cmake b/deal.II/cmake/configure/configure_petsc.cmake index 62e8a7660b..b3ae3c07c6 100644 --- a/deal.II/cmake/configure/configure_petsc.cmake +++ b/deal.II/cmake/configure/configure_petsc.cmake @@ -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" diff --git a/deal.II/cmake/configure/configure_slepc.cmake b/deal.II/cmake/configure/configure_slepc.cmake index e7b5f60adb..381d7b534d 100644 --- a/deal.II/cmake/configure/configure_slepc.cmake +++ b/deal.II/cmake/configure/configure_slepc.cmake @@ -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" diff --git a/deal.II/cmake/configure/configure_trilinos.cmake b/deal.II/cmake/configure/configure_trilinos.cmake index b1a93e5ea7..996beab5e4 100644 --- a/deal.II/cmake/configure/configure_trilinos.cmake +++ b/deal.II/cmake/configure/configure_trilinos.cmake @@ -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) diff --git a/deal.II/cmake/macros/macro_configure_feature.cmake b/deal.II/cmake/macros/macro_configure_feature.cmake index 5b6a606013..991531e19b 100644 --- a/deal.II/cmake/macros/macro_configure_feature.cmake +++ b/deal.II/cmake/macros/macro_configure_feature.cmake @@ -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}"