From: maier Date: Tue, 25 Sep 2012 08:15:40 +0000 (+0000) Subject: Clarify some error messages X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fcf2a83d229bb7b778e89bc393769e10f4dc565;p=dealii-svn.git Clarify some error messages git-svn-id: https://svn.dealii.org/branches/branch_cmake@26707 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_boost.cmake b/deal.II/cmake/configure/configure_boost.cmake index 32e36651a6..f17f90ca09 100644 --- a/deal.II/cmake/configure/configure_boost.cmake +++ b/deal.II/cmake/configure/configure_boost.cmake @@ -97,3 +97,17 @@ ENDMACRO() CONFIGURE_FEATURE(BOOST) + +# +# DEAL_II_WITH_BOOST is always required. +# +IF(NOT DEAL_II_WITH_BOOST) + IF(DEAL_II_FEATURE_AUTODETECTION) + FEATURE_ERROR_MESSAGE("BOOST") + ELSE() + MESSAGE(SEND_ERROR "\n" + "Unmet configuration requirements: " + "DEAL_II_WITH_BOOST required, but set to OFF!.\n\n" + ) + ENDIF() +ENDIF() diff --git a/deal.II/cmake/configure/configure_doxygen.cmake b/deal.II/cmake/configure/configure_doxygen.cmake index 6831e0713f..4b639b4c12 100644 --- a/deal.II/cmake/configure/configure_doxygen.cmake +++ b/deal.II/cmake/configure/configure_doxygen.cmake @@ -48,3 +48,18 @@ ENDMACRO() CONFIGURE_FEATURE(DOXYGEN) +# +# Additional dependency check: +# DEAL_II_COMPONENT_DOCUMENTATION needs DEAL_II_WITH_DOXYGEN +# +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" + "DEAL_II_COMPONENT_DOCUMENTATION has unmet configuration requirements: " + "DEAL_II_WITH_DOXYGEN required, but set to OFF!\n\n" + ) + ENDIF() +ENDIF() + diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index 1a7ab52501..bc62714c11 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -1,3 +1,4 @@ + # # Setup cached variables prior to the PROJECT(deal.II) call # @@ -94,8 +95,10 @@ SET(deal_ii_used_flags ) FOREACH(flag ${deal_ii_used_flags}) + # # "CACHE" ensures that we only set the variable if it is not already set - # as a cached variable, effectively we're setting a default value: + # as a cached variable. Effectively we're setting a default value: + # SET(${flag} "" CACHE STRING "The user supplied cache variable will be appended _at the end_ of the auto generated ${flag} variable" ) @@ -103,7 +106,7 @@ FOREACH(flag ${deal_ii_used_flags}) # # Save the initial (cached) variable at this point and clear it. # ${flags}_SAVED will be appended to ${flags} in - # setup_cached_compiler_flags_finalize.cmake (called at the end of the + # setup_finalize.cmake (called at the end of the # main CMakeLists.txt file). # SET(${flag}_SAVED "${${flag}}") diff --git a/deal.II/cmake/setup_compiler_flags_intel.cmake b/deal.II/cmake/setup_compiler_flags_intel.cmake index e69de29bb2..ce5208a53b 100644 --- a/deal.II/cmake/setup_compiler_flags_intel.cmake +++ b/deal.II/cmake/setup_compiler_flags_intel.cmake @@ -0,0 +1,5 @@ + +# +# *Yeah* +# + diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake index c8cbb94147..823424231e 100644 --- a/deal.II/cmake/setup_custom_targets.cmake +++ b/deal.II/cmake/setup_custom_targets.cmake @@ -1,12 +1,16 @@ # -# Setup some convenience custom targets for the build system: +# Setup some convenience custom targets for the build system, i.e. # - +# $ make . +# +# We add custom targets for building all targets necessary to install a +# specific component (too bad, we have to do this by hand. There is no cmake +# internal way to do this, yet...): +# +# library, documentation, compat_files, project_config # -# Custom targets for building all targets necessary to install a specific -# component. (Too bad, we have to do this by hand. There is no cmake -# internal way to do this, yet...) +# And a release and debug target (depending on configuration) # ADD_CUSTOM_TARGET(library) diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake index 355d4fec13..45ddaecdc0 100644 --- a/deal.II/cmake/setup_finalize.cmake +++ b/deal.II/cmake/setup_finalize.cmake @@ -3,30 +3,6 @@ # -# -# Dependency check: -# -# - DEAL_II_COMPONENT_DOCUMENTATION needs DEAL_II_WITH_DOXYGEN. -# -# - DEAL_II_WITH_BOOST has to be enabled. -# -# TODO: It is a bit sloppy to test this here. But this is the only -# dependency of this kind atm. -# -IF(DEAL_II_COMPONENT_DOCUMENTATION AND NOT DEAL_II_WITH_DOXYGEN) - MESSAGE(SEND_ERROR "\n" - "DEAL_II_COMPONENT_DOCUMENTATION has unmet configuration requirements: " - "DEAL_II_WITH_DOXYGEN required, but set to OFF!\n\n" - ) -ENDIF() - -IF(NOT DEAL_II_WITH_BOOST) - MESSAGE(SEND_ERROR "\n" - "Unmet configuration requirements: " - "DEAL_II_WITH_BOOST required, but set to OFF!.\n\n" - ) -ENDIF() - # # Hide some cmake specific cached variables. This is annoying... @@ -96,13 +72,18 @@ The contrib UMFPACK library will be compiled with the following C compiler: ENDIF() ENDIF() - IF(NOT DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS) - MESSAGE("\n -WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n") + MESSAGE("\n" + "WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n" + ) +ELSE() + IF(NOT DEAL_II_KNOWN_COMPILER) + MESSAGE("\n" + "WARNING: Unknown compiler! Please set compiler flags by hand.\n" + ) + ENDIF() ENDIF() - MESSAGE(" Configured Features (" "DEAL_II_FEATURE_AUTODETECTION = ${DEAL_II_FEATURE_AUTODETECTION}, "