From 5589cdd72c73b1b0a2501cf89ffaab00576046fe Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 18 Sep 2012 09:55:23 +0000 Subject: [PATCH] Reformat MESSAGE strings git-svn-id: https://svn.dealii.org/branches/branch_cmake@26469 0785d39b-7218-0410-832d-ea1e28bc413d --- .../check/check_for_compiler_features.cmake | 17 ++++-- .../cmake/configure/configure_1_mpi.cmake | 18 +++---- .../cmake/configure/configure_1_tbb.cmake | 9 ++-- .../cmake/configure/configure_boost.cmake | 23 ++++---- .../configure/configure_functionparser.cmake | 7 ++- .../cmake/configure/configure_metis.cmake | 8 ++- .../cmake/configure/configure_p4est.cmake | 29 ++++++----- .../cmake/configure/configure_trilinos.cmake | 52 ++++++++----------- .../cmake/configure/configure_umfpack.cmake | 19 +++---- .../macros/macro_configure_feature.cmake | 44 ++++++++-------- deal.II/contrib/cmake/setup_deal_ii.cmake | 12 +++-- 11 files changed, 120 insertions(+), 118 deletions(-) diff --git a/deal.II/contrib/cmake/check/check_for_compiler_features.cmake b/deal.II/contrib/cmake/check/check_for_compiler_features.cmake index dcfc7fd2e5..28d4fc0b90 100644 --- a/deal.II/contrib/cmake/check/check_for_compiler_features.cmake +++ b/deal.II/contrib/cmake/check/check_for_compiler_features.cmake @@ -337,7 +337,9 @@ CHECK_CXX_COMPILER_FLAG( DEAL_II_COMPILER_HAS_AS_NEEDED) IF(DEAL_II_COMPILER_HAS_AS_NEEDED) - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-as-needed") + SET(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-as-needed" + ) ENDIF() @@ -361,10 +363,13 @@ GET_CXX_SOURCE_RETURN_VALUE( IF(NOT DEAL_II_MIN_VECTOR_CAPACITY) # We have a problem... MESSAGE(WARNING - "Could not determine DEAL_II_MIN_VECTOR_CAPACITY, source might not compile..." + "Could not determine DEAL_II_MIN_VECTOR_CAPACITY, " + "source might not compile..." ) ELSE() - SET(DEAL_II_MIN_VECTOR_CAPACITY ${DEAL_II_MIN_VECTOR_CAPACITY_RETURN_VALUE}) + SET(DEAL_II_MIN_VECTOR_CAPACITY + ${DEAL_II_MIN_VECTOR_CAPACITY_RETURN_VALUE} + ) ENDIF() @@ -388,8 +393,10 @@ GET_CXX_SOURCE_RETURN_VALUE( IF(NOT DEAL_II_MIN_BOOL_VECTOR_CAPACITY) # We have a problem... MESSAGE(WARNING - "Could not determine DEAL_II_MIN_VECTOR_CAPACITY, source might not compile..." + "Could not determine DEAL_II_MIN_VECTOR_CAPACITY, " + "source might not compile..." ) ELSE() - SET(DEAL_II_MIN_BOOL_VECTOR_CAPACITY ${DEAL_II_MIN_BOOL_VECTOR_CAPACITY_RETURN_VALUE}) + SET(DEAL_II_MIN_BOOL_VECTOR_CAPACITY + ${DEAL_II_MIN_BOOL_VECTOR_CAPACITY_RETURN_VALUE}) ENDIF() diff --git a/deal.II/contrib/cmake/configure/configure_1_mpi.cmake b/deal.II/contrib/cmake/configure/configure_1_mpi.cmake index 1c1b8eae4a..7007f90fd6 100644 --- a/deal.II/contrib/cmake/configure/configure_1_mpi.cmake +++ b/deal.II/contrib/cmake/configure/configure_1_mpi.cmake @@ -17,15 +17,15 @@ MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL var) INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH}) SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS}") + # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}") LIST(APPEND deal_ii_external_libraries ${MPI_CXX_LIBRARIES}) SET(DEAL_II_COMPILER_SUPPORTS_MPI TRUE) - # TODO: Set up the rest: + # TODO: (Maybe) set up the rest: #MPI_CXX_COMPILER MPI Compiler wrapper for CXX - #MPI_CXX_COMPILE_FLAGS Compilation flags for MPI programs #MPIEXEC Executable for running MPI programs @@ -41,14 +41,12 @@ ENDMACRO() SET(FEATURE_MPI_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_MPI_ERROR_MESSAGE) - MESSAGE(SEND_ERROR " -Could not find any suitable mpi library! - -Please ensure that an mpi library is installed on your computer. -If the library is not at a default location, either provide some hints -for the autodetection, or set the relevant variables by hand in ccmake. - -") + MESSAGE(SEND_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" + "for the autodetection, or set the relevant variables by hand in ccmake.\n" + ) ENDMACRO() diff --git a/deal.II/contrib/cmake/configure/configure_1_tbb.cmake b/deal.II/contrib/cmake/configure/configure_1_tbb.cmake index f314bf1428..64206014f7 100644 --- a/deal.II/contrib/cmake/configure/configure_1_tbb.cmake +++ b/deal.II/contrib/cmake/configure/configure_1_tbb.cmake @@ -102,11 +102,10 @@ MACRO(FEATURE_TBB_CONFIGURE_EXTERNAL var) IF(TBB_DEBUG_FOUND) LIST(APPEND deal_ii_external_libraries ${TBB_DEBUG_LIBRARY}) ELSE() - MESSAGE(WARNING " -deal.II was configured with CMAKE_BUILD_TYPE=Debug but no debug tbb -library was found. The regular tbb library will be used instead. - -") + MESSAGE(WARNING "\n" + "deal.II was configured with CMAKE_BUILD_TYPE=Debug but no debug tbb\n" + "library was found. The regular tbb library will be used instead.\n\n" + ) LIST(APPEND deal_ii_external_libraries ${TBB_LIBRARY}) ENDIF() diff --git a/deal.II/contrib/cmake/configure/configure_boost.cmake b/deal.II/contrib/cmake/configure/configure_boost.cmake index b94bc1a501..bf119601cd 100644 --- a/deal.II/contrib/cmake/configure/configure_boost.cmake +++ b/deal.II/contrib/cmake/configure/configure_boost.cmake @@ -16,7 +16,8 @@ SET(DEAL_II_WITH_BOOST "ON" # IF(NOT FEATURE_TBB_HAVE_CONTRIB) MESSAGE(FATAL_ERROR - "Internal build system error: configure_boost.cmake included before configure_tbb.cmake" + "Internal build system error: configure_boost.cmake included " + "before configure_tbb.cmake" ) ENDIF() @@ -68,20 +69,24 @@ MACRO(FEATURE_BOOST_CONFIGURE_CONTRIB var) ${CMAKE_SOURCE_DIR}/contrib/boost-1.49.0/include ) - ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/contrib/boost-1.49.0/libs/serialization/src) + ADD_SUBDIRECTORY( + ${CMAKE_SOURCE_DIR}/contrib/boost-1.49.0/libs/serialization/src + ) LIST(APPEND deal_ii_additional_object_files $ ) IF( DEAL_II_USE_MT AND NOT DEAL_II_CAN_USE_CXX1X) - # If the C++ compiler doesn't completely support the C++1x standard (and - # consequently we can't use std::thread, std::mutex, etc), then include all - # the files that form BOOST's thread implementation so that we don't have to - # build BOOST itself only to get at this small part of it. it also ensures - # that we use the correct compiler and flags - - ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/contrib/boost-1.49.0/libs/thread/src) + # If the C++ compiler doesn't completely support the C++1x standard + # (and consequently we can't use std::thread, std::mutex, etc), then + # include all the files that form BOOST's thread implementation so that + # we don't have to build BOOST itself only to get at this small part of + # it. it also ensures that we use the correct compiler and flags + + ADD_SUBDIRECTORY( + ${CMAKE_SOURCE_DIR}/contrib/boost-1.49.0/libs/thread/src + ) LIST(APPEND deal_ii_additional_object_files $ diff --git a/deal.II/contrib/cmake/configure/configure_functionparser.cmake b/deal.II/contrib/cmake/configure/configure_functionparser.cmake index 77e2237367..2aab942e52 100644 --- a/deal.II/contrib/cmake/configure/configure_functionparser.cmake +++ b/deal.II/contrib/cmake/configure/configure_functionparser.cmake @@ -1,8 +1,7 @@ MACRO(FEATURE_FUNCTIONPARSER_FIND_EXTERNAL var) - MESSAGE(WARNING " -Module for finding functionparser not written, yet! - -") + MESSAGE(WARNING "\n" + "Module for finding functionparser not written, yet!\n\n" + ) ENDMACRO() diff --git a/deal.II/contrib/cmake/configure/configure_metis.cmake b/deal.II/contrib/cmake/configure/configure_metis.cmake index 1f9e9c216b..7c81afe45b 100644 --- a/deal.II/contrib/cmake/configure/configure_metis.cmake +++ b/deal.II/contrib/cmake/configure/configure_metis.cmake @@ -9,11 +9,9 @@ MACRO(FEATURE_METIS_FIND_EXTERNAL var) IF(METIS_FOUND AND METIS_MAJOR GREATER 4) SET(${var} TRUE) ELSE() - MESSAGE(WARNING " -Could not find a sufficient modern metis installation: -Version 5.x required! - -" + MESSAGE(WARNING "\n" + "Could not find a sufficient modern metis installation:" + "Version 5.x required!" ) ENDIF() diff --git a/deal.II/contrib/cmake/configure/configure_p4est.cmake b/deal.II/contrib/cmake/configure/configure_p4est.cmake index d0f452ab6a..9dea4a18ed 100644 --- a/deal.II/contrib/cmake/configure/configure_p4est.cmake +++ b/deal.II/contrib/cmake/configure/configure_p4est.cmake @@ -13,6 +13,10 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var) FIND_PACKAGE(P4EST) FIND_PACKAGE(SC) + # + # TODO: Check for mpi consistency... + # + IF(P4EST_FOUND AND SC_FOUND) SET(${var} TRUE) ENDIF() @@ -30,12 +34,11 @@ MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL var) ${P4EST_DEBUG_LIBRARY} ${SC_DEBUG_LIBRARY} ) ELSE() - MESSAGE(WARNING " -deal.II was configured with CMAKE_BUILD_TYPE=Debug but no debug p4est and -sc libraries were found. The regular p4est and sc libraries will be used -instead. - -") + MESSAGE(WARNING "\n" + "deal.II was configured with CMAKE_BUILD_TYPE=Debug but no debug p4est and\n" + "sc libraries were found. The regular p4est and sc libraries will be used\n" + "instead.\n\n" + ) LIST(APPEND deal_ii_external_libraries ${P4EST_LIBRARY} ${SC_LIBRARY} ) @@ -57,14 +60,12 @@ SET(FEATURE_P4EST_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_P4EST_ERROR_MESSAGE) - MESSAGE(SEND_ERROR " -Could not find the p4est and sc libraries! - -Please ensure that the libraries are installed on your computer. -If the libraries are not at a default location, either provide some hints -for the autodetection, or set the relevant variables by hand in ccmake. - -") + MESSAGE(SEND_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" + "for the autodetection, or set the relevant variables by hand in ccmake.\n\n" + ) ENDMACRO() diff --git a/deal.II/contrib/cmake/configure/configure_trilinos.cmake b/deal.II/contrib/cmake/configure/configure_trilinos.cmake index e8a9384887..55f3766c0a 100644 --- a/deal.II/contrib/cmake/configure/configure_trilinos.cmake +++ b/deal.II/contrib/cmake/configure/configure_trilinos.cmake @@ -35,14 +35,12 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) ENDFOREACH() IF(NOT ${var}) - MESSAGE(WARNING " -The Trilinos installation is missing one or more modules necessary for -the deal.II Trilinos interfaces: -${macro_modules_missing} - -Please re-install Trilinos with the missing Trilinos subpackages enabled. - -") + MESSAGE(WARNING "\n" + "The Trilinos installation is missing one or more modules necessary for\n" + "the deal.II Trilinos interfaces:\n" + "${macro_modules_missing}\n\n" + "Please re-install Trilinos with the missing Trilinos subpackages enabled.\n\n" + ) ENDIF() @@ -54,12 +52,11 @@ Please re-install Trilinos with the missing Trilinos subpackages enabled. # https://software.sandia.gov/bugzilla/show_bug.cgi?id=5319 # IF(TRILINOS_MAJOR EQUAL 10 AND TRILINOS_MINOR EQUAL 6) - MESSAGE(WARNING " -Trilinos versions ${TRILINOS_MAJOR}.${TRILINOS_MINOR}.x have bugs that make -it incompatible with deal.II. Please use versions before 10.6 or after -10.8.1. - -") + MESSAGE(WARNING "\n" + "Trilinos versions ${TRILINOS_MAJOR}.${TRILINOS_MINOR}.x have bugs that make\n" + "it incompatible with deal.II. Please use versions before 10.6 or after\n" + "10.8.1.\n\n" + ) SET(${var} FALSE) ENDIF() @@ -72,12 +69,11 @@ it incompatible with deal.II. Please use versions before 10.6 or after IF( TRILINOS_MAJOR EQUAL 10 AND TRILINOS_MINOR EQUAL 8 AND TRILINOS_SUBMINOR LESS 2 ) - MESSAGE(WARNING " -Trilinos versions 10.8.0 and 10.8.1 have bugs that make -it incompatible with deal.II. Please use versions before 10.6 or after -10.8.1. - -") + MESSAGE(WARNING "\n" + "Trilinos versions 10.8.0 and 10.8.1 have bugs that make\n" + "it incompatible with deal.II. Please use versions before 10.6 or after\n" + "10.8.1.\n\n" + ) SET(${var} FALSE) ENDIF() @@ -100,10 +96,9 @@ it incompatible with deal.II. Please use versions before 10.6 or after IF( (TRILINOS_HAVE_EPETRA_MPICOMM_H AND NOT DEAL_II_COMPILER_SUPPORTS_MPI) OR (NOT TRILINOS_HAVE_EPETRA_MPICOMM_H AND DEAL_II_COMPILER_SUPPORTS_MPI)) - MESSAGE(WARNING " -Trilinos has to be configured with the same MPI configuration as deal.II. - -") + MESSAGE(WARNING "\n" + "Trilinos has to be configured with the same MPI configuration as deal.II.\n\n" + ) SET(${var} FALSE) ENDIF() @@ -126,11 +121,10 @@ Trilinos has to be configured with the same MPI configuration as deal.II. LIST(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIR}) IF(DEAL_II_CAN_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11) - MESSAGE(WARNING " -Your Trilinos installation is not compatible with the C++ standard selected for this compiler. -See the deal.II FAQ page for a solution. - -") + MESSAGE(WARNING "\n" + "Your Trilinos installation is not compatible with the C++ standard selected for\n" + "this compiler. See the deal.II FAQ page for a solution.\n\n" + ) SET(${var} FALSE) ENDIF() diff --git a/deal.II/contrib/cmake/configure/configure_umfpack.cmake b/deal.II/contrib/cmake/configure/configure_umfpack.cmake index 4d0fc723f9..c640ba5bd0 100644 --- a/deal.II/contrib/cmake/configure/configure_umfpack.cmake +++ b/deal.II/contrib/cmake/configure/configure_umfpack.cmake @@ -76,17 +76,14 @@ SET(FEATURE_UMFPACK_CUSTOM_ERROR_MESSAGE TRUE) MACRO(FEATURE_UMFPACK_ERROR_MESSAGE) - MESSAGE(SEND_ERROR " -Could not find the umfpack and amd libraries! - -Please ensure that the libraries are installed on your computer. -If the libraries are not at a default location, either provide some hints -for the autodetection, or set the relevant variables by hand in ccmake. - -Alternatively you may choose to compile the bundled contrib libraries -by setting DEAL_II_ALLOW_CONTRIB=on or DEAL_II_FORCE_CONTRIB_UMFPACK=on. - -") + MESSAGE(SEND_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" + "for the autodetection, or set the relevant variables by hand in ccmake.\n\n" + "Alternatively you may choose to compile the bundled contrib libraries\n" + "by setting DEAL_II_ALLOW_CONTRIB=on or DEAL_II_FORCE_CONTRIB_UMFPACK=on.\n\n" + ) ENDMACRO() diff --git a/deal.II/contrib/cmake/macros/macro_configure_feature.cmake b/deal.II/contrib/cmake/macros/macro_configure_feature.cmake index 834f777837..1aa87d25ac 100644 --- a/deal.II/contrib/cmake/macros/macro_configure_feature.cmake +++ b/deal.II/contrib/cmake/macros/macro_configure_feature.cmake @@ -88,27 +88,22 @@ ENDMACRO() MACRO(FEATURE_ERROR_MESSAGE feature) STRING(TOLOWER ${feature} feature_lowercase) IF(FEATURE_${feature}_HAVE_CONTRIB) - MESSAGE(SEND_ERROR " -Could not find the ${feature_lowercase} library! - -Please ensure that the ${feature_lowercase} library is installed on your computer. -If the library is not at a default location, either provide some hints -for the autodetection, or set the relevant variables by hand in ccmake. - -Alternatively you may choose to compile the bundled contrib library of -${feature_lowercase} by setting DEAL_II_ALLOW_CONTRIB=on or -DEAL_II_FORCE_CONTRIB_${feature}=on. - -") + MESSAGE(SEND_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 contrib library of\n" + "${feature_lowercase} by setting DEAL_II_ALLOW_CONTRIB=on or\n" + "DEAL_II_FORCE_CONTRIB_${feature}=on.\n\n" + ) ELSE() - MESSAGE(SEND_ERROR " -Could not find the ${feature_lowercase} library! - -Please ensure that the ${feature_lowercase} library is installed on your computer. -If the library is not at a default location, either provide some hints -for the autodetection, or set the relevant variables by hand in ccmake. - -") + MESSAGE(SEND_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" + ) ENDIF() ENDMACRO() @@ -128,12 +123,14 @@ MACRO(CONFIGURE_FEATURE feature) IF(DEAL_II_FEATURE_AUTODETECTION) MESSAGE(STATUS - "DEAL_II_WITH_${feature} has unmet configuration requirements: ${macro_dependency} has to be set to \"ON\"." + "DEAL_II_WITH_${feature} has unmet configuration requirements: " + "${macro_dependency} has to be set to \"ON\"." ) SET_CACHED_OPTION(DEAL_II_WITH_${feature} OFF) ELSE() MESSAGE(SEND_ERROR - "DEAL_II_WITH_${feature} has unmet configuration requirements: ${macro_dependency} has to be set to \"ON\"." + "DEAL_II_WITH_${feature} has unmet configuration requirements: " + "${macro_dependency} has to be set to \"ON\"." ) ENDIF() @@ -171,7 +168,8 @@ MACRO(CONFIGURE_FEATURE feature) ENDIF() ELSE() MESSAGE(FATAL_ERROR - "Internal build system error: DEAL_II_FORCE_CONTRIB_${feature} defined, but FEATURE_${feature}_HAVE_CONTRIB not present." + "Internal build system error: DEAL_II_FORCE_CONTRIB_${feature} " + "defined, but FEATURE_${feature}_HAVE_CONTRIB not present." ) ENDIF() diff --git a/deal.II/contrib/cmake/setup_deal_ii.cmake b/deal.II/contrib/cmake/setup_deal_ii.cmake index 4a7e3c26d9..2ab68cf437 100644 --- a/deal.II/contrib/cmake/setup_deal_ii.cmake +++ b/deal.II/contrib/cmake/setup_deal_ii.cmake @@ -10,11 +10,17 @@ SET(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME}) SET(DEAL_II_PACKAGE_VERSION ${VERSION}) -SET(DEAL_II_PACKAGE_STRING "${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}") +SET(DEAL_II_PACKAGE_STRING + "${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}" + ) SET(DEAL_II_PACKAGE_URL "") -STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" DEAL_II_MAJOR "${VERSION}") -STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_MINOR "${VERSION}") +STRING(REGEX REPLACE + "^([0-9]+)\\..*" "\\1" DEAL_II_MAJOR "${VERSION}" + ) +STRING(REGEX REPLACE + "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_MINOR "${VERSION}" + ) SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX}) -- 2.39.5