From e7b968531bca4a0d35b085fa6104356c3995ea08 Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 4 Oct 2012 21:09:52 +0000 Subject: [PATCH] Promote every SEND_ERROR message to FATAL_ERROR to produce more prominent error messages. git-svn-id: https://svn.dealii.org/branches/branch_cmake@26958 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/configure/configure_1_mpi.cmake | 2 +- deal.II/cmake/configure/configure_boost.cmake | 2 +- .../cmake/configure/configure_doxygen.cmake | 4 +-- .../configure/configure_functionparser.cmake | 2 +- deal.II/cmake/configure/configure_metis.cmake | 2 +- deal.II/cmake/configure/configure_mumps.cmake | 2 +- deal.II/cmake/configure/configure_p4est.cmake | 2 +- deal.II/cmake/configure/configure_petsc.cmake | 2 +- .../cmake/configure/configure_trilinos.cmake | 2 +- .../cmake/configure/configure_umfpack.cmake | 2 +- .../macros/macro_configure_feature.cmake | 29 ++++++++++--------- deal.II/cmake/setup_compiler_flags.cmake | 2 +- 12 files changed, 28 insertions(+), 25 deletions(-) diff --git a/deal.II/cmake/configure/configure_1_mpi.cmake b/deal.II/cmake/configure/configure_1_mpi.cmake index adf42edd9e..e8bf9ad62f 100644 --- a/deal.II/cmake/configure/configure_1_mpi.cmake +++ b/deal.II/cmake/configure/configure_1_mpi.cmake @@ -63,7 +63,7 @@ SET(FEATURE_MPI_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_MPI_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Could not find any suitable mpi library!\n\n" "Please ensure that an mpi library is installed on your computer.\n" "If the library is not at a default location, either provide some hints\n" diff --git a/deal.II/cmake/configure/configure_boost.cmake b/deal.II/cmake/configure/configure_boost.cmake index 181ca57c45..327aca8465 100644 --- a/deal.II/cmake/configure/configure_boost.cmake +++ b/deal.II/cmake/configure/configure_boost.cmake @@ -96,7 +96,7 @@ IF(NOT DEAL_II_WITH_BOOST) IF(DEAL_II_FEATURE_AUTODETECTION) FEATURE_ERROR_MESSAGE("BOOST") ELSE() - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Unmet configuration requirements: " "DEAL_II_WITH_BOOST required, but set to OFF!.\n\n" ) diff --git a/deal.II/cmake/configure/configure_doxygen.cmake b/deal.II/cmake/configure/configure_doxygen.cmake index b8e58e2d4d..8c5c987568 100644 --- a/deal.II/cmake/configure/configure_doxygen.cmake +++ b/deal.II/cmake/configure/configure_doxygen.cmake @@ -49,7 +49,7 @@ SET(FEATURE_DOXYGEN_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_DOXYGEN_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Could not find the doxygen package!\n\n" "Please ensure that doxygen and dot are installed on your computer.\n" "If the packages are not at a default location, either provide some hints\n" @@ -68,7 +68,7 @@ IF(DEAL_II_COMPONENT_DOCUMENTATION AND NOT DEAL_II_WITH_DOXYGEN) IF(DEAL_II_FEATURE_AUTODETECTION) FEATURE_DOXYGEN_ERROR_MESSAGE() ELSE() - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "DEAL_II_COMPONENT_DOCUMENTATION has unmet configuration requirements: " "DEAL_II_WITH_DOXYGEN required, but set to OFF!\n\n" ) diff --git a/deal.II/cmake/configure/configure_functionparser.cmake b/deal.II/cmake/configure/configure_functionparser.cmake index e4d7f9726b..f6ef8b33c8 100644 --- a/deal.II/cmake/configure/configure_functionparser.cmake +++ b/deal.II/cmake/configure/configure_functionparser.cmake @@ -43,7 +43,7 @@ SET(FEATURE_FUNCTIONPARSER_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_FUNCTIONPARSER_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "No module available for finding functionparser externally.\n" "Disable DEAL_II_WITH_FUNCTIONPARSER, or enable DEAL_II_ALLOW_BUNDLED.\n\n" ) diff --git a/deal.II/cmake/configure/configure_metis.cmake b/deal.II/cmake/configure/configure_metis.cmake index ddf4b8e34b..dba4ba4f5a 100644 --- a/deal.II/cmake/configure/configure_metis.cmake +++ b/deal.II/cmake/configure/configure_metis.cmake @@ -45,7 +45,7 @@ SET(FEATURE_METIS_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_METIS_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Could not find the metis library!\n\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" diff --git a/deal.II/cmake/configure/configure_mumps.cmake b/deal.II/cmake/configure/configure_mumps.cmake index 2942b9a840..d704eab5da 100644 --- a/deal.II/cmake/configure/configure_mumps.cmake +++ b/deal.II/cmake/configure/configure_mumps.cmake @@ -48,7 +48,7 @@ SET(FEATURE_MUMPS_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_MUMPS_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + 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" diff --git a/deal.II/cmake/configure/configure_p4est.cmake b/deal.II/cmake/configure/configure_p4est.cmake index 0c8c03fedc..6846194aa4 100644 --- a/deal.II/cmake/configure/configure_p4est.cmake +++ b/deal.II/cmake/configure/configure_p4est.cmake @@ -60,7 +60,7 @@ SET(FEATURE_P4EST_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_P4EST_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Could not find the p4est and sc libraries!\n\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" diff --git a/deal.II/cmake/configure/configure_petsc.cmake b/deal.II/cmake/configure/configure_petsc.cmake index 6247da4c62..d205b41fef 100644 --- a/deal.II/cmake/configure/configure_petsc.cmake +++ b/deal.II/cmake/configure/configure_petsc.cmake @@ -96,7 +96,7 @@ SET(FEATURE_PETSC_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_PETSC_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Could not find the petsc library!\n\n" "Please ensure that the petsc library version 3.0.0 or newer is installed on your computer.\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 f1eb7ad95f..4d220425de 100644 --- a/deal.II/cmake/configure/configure_trilinos.cmake +++ b/deal.II/cmake/configure/configure_trilinos.cmake @@ -205,7 +205,7 @@ SET(FEATURE_TRILINOS_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_TRILINOS_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Could not find a suitable set of trilinos libraries!\n" "Please ensure that all necessary libraries are installed on your computer.\n" "If the libraries are not at a default location, either provide some hints\n" diff --git a/deal.II/cmake/configure/configure_umfpack.cmake b/deal.II/cmake/configure/configure_umfpack.cmake index 9c926a48c9..9ea8c231bc 100644 --- a/deal.II/cmake/configure/configure_umfpack.cmake +++ b/deal.II/cmake/configure/configure_umfpack.cmake @@ -58,7 +58,7 @@ SET(FEATURE_UMFPACK_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_UMFPACK_ERROR_MESSAGE) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Could not find the umfpack and amd 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" diff --git a/deal.II/cmake/macros/macro_configure_feature.cmake b/deal.II/cmake/macros/macro_configure_feature.cmake index a497af88a3..bc4ae86f19 100644 --- a/deal.II/cmake/macros/macro_configure_feature.cmake +++ b/deal.II/cmake/macros/macro_configure_feature.cmake @@ -49,7 +49,7 @@ # fullfilled. In this case all necessary variables for # FEATURE_${feature}_CONFIGURE_EXTERNAL must be set. Otherwise # var should remain unset. -# This macro should give an error (SEND_ERROR or FATAL_ERROR). +# This macro should give an error (FATAL_ERROR or FATAL_ERROR). # # FEATURE_${feature}_CONFIGURE_EXTERNAL(var) (macro, mandatory) # which should setup all necessary configuration for the feature with @@ -61,7 +61,7 @@ # is set up, or be undefined. # # FEATURE_${feature}_ERROR_MESSAGE() (macro, optional) -# which should print a meaningfull error message (with SEND_ERROR) for +# which should print a meaningfull error message (with FATAL_ERROR) for # the case that no external library was found (and bundled is not # allowed to be used.) If not defined, a suitable default error message # will be printed. @@ -102,7 +102,7 @@ ENDMACRO() MACRO(FEATURE_ERROR_MESSAGE feature) STRING(TOLOWER ${feature} feature_lowercase) IF(FEATURE_${feature}_HAVE_BUNDLED) - MESSAGE(SEND_ERROR "\n" + 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" @@ -112,7 +112,7 @@ MACRO(FEATURE_ERROR_MESSAGE feature) "DEAL_II_FORCE_BUNDLED_${feature}=on.\n\n" ) ELSE() - MESSAGE(SEND_ERROR "\n" + 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" @@ -173,7 +173,7 @@ MACRO(CONFIGURE_FEATURE feature) FOREACH(macro_dependency ${FEATURE_${feature}_DEPENDS}) IF(NOT ${macro_dependency}) IF(DEAL_II_WITH_${feature}) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "DEAL_II_WITH_${feature} has unmet configuration requirements: " "${macro_dependency} has to be set to \"ON\".\n\n" ) @@ -205,14 +205,15 @@ MACRO(CONFIGURE_FEATURE feature) SET_CACHED_OPTION(${feature} ON) ELSE() # This should not happen. So give an error - MESSAGE(SEND_ERROR - "Failed to set up DEAL_II_WITH_${feature} with bundled packages." + MESSAGE(FATAL_ERROR + "\nInternal build system error: Failed to set up " + "DEAL_II_WITH_${feature} with bundled packages.\n\n" ) ENDIF() ELSE() - MESSAGE(FATAL_ERROR + MESSAGE(FATAL_ERROR "\n" "Internal build system error: DEAL_II_FORCE_BUNDLED_${feature} " - "defined, but FEATURE_${feature}_HAVE_BUNDLED not present." + "defined, but FEATURE_${feature}_HAVE_BUNDLED not present.\n" ) ENDIF() @@ -240,8 +241,9 @@ MACRO(CONFIGURE_FEATURE feature) SET_CACHED_OPTION(${feature} ON) ELSE() # This should not happen. So give an error - MESSAGE(SEND_ERROR - "Failed to set up DEAL_II_WITH_${feature} with external dependencies." + MESSAGE(FATAL_ERROR + "\nInternal build system error: Failed to set up " + "DEAL_II_WITH_${feature} with external dependencies.\n\n" ) ENDIF() @@ -264,8 +266,9 @@ MACRO(CONFIGURE_FEATURE feature) ENDIF() ELSE() # This should not happen. So give an error - MESSAGE(SEND_ERROR - "Failed to set up DEAL_II_WITH_${feature} with bundled packages." + MESSAGE(FATAL_ERROR + "\nInternal build system error: Failed to set up " + "DEAL_II_WITH_${feature} with bundled packages.\n\n" ) ENDIF() ELSE() diff --git a/deal.II/cmake/setup_compiler_flags.cmake b/deal.II/cmake/setup_compiler_flags.cmake index d009c30554..a92de7262b 100644 --- a/deal.II/cmake/setup_compiler_flags.cmake +++ b/deal.II/cmake/setup_compiler_flags.cmake @@ -58,7 +58,7 @@ # IF(NOT ( "${CMAKE_C_COMPILER_ID}" STREQUAL "${CMAKE_CXX_COMPILER_ID}" AND "${CMAKE_C_COMPILER_VERSION}" STREQUAL "${CMAKE_CXX_COMPILER_VERSION}" ) ) - MESSAGE(SEND_ERROR "\n" + MESSAGE(FATAL_ERROR "\n" "Configuration error: The specified C and CXX compiler have to be the " "same, but found:\n" "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}\n" -- 2.39.5