From: Matthias Maier Date: Tue, 25 Sep 2012 10:26:44 +0000 (+0000) Subject: A nice error message for PETSc X-Git-Tag: v8.0.0~1079^2~657 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf0dfdc25e62feb3a0519f81ed0ada00f87d5299;p=dealii.git A nice error message for PETSc git-svn-id: https://svn.dealii.org/branches/branch_cmake@26715 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_petsc.cmake b/deal.II/cmake/configure/configure_petsc.cmake index a245e4a873..4ba04d9841 100644 --- a/deal.II/cmake/configure/configure_petsc.cmake +++ b/deal.II/cmake/configure/configure_petsc.cmake @@ -87,5 +87,25 @@ MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL var) ENDMACRO() +SET(FEATURE_PETSC_CUSTOM_ERROR_MESSAGE TRUE) + + +MACRO(FEATURE_PETSC_ERROR_MESSAGE) + MESSAGE(SEND_ERROR "\n" + "Could not find the petsc library!\n\n" + "Please ensure that the petsc library is installed on your computer.\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" + " $ PETSC_DIR=\"...\" cmake <...>\n" + " $ ccmake -DPETSC_DIR=\"...\" cmake <...>\n" + "PETSc compiled in source tree:\n" + " $ PETSC_DIR=\"...\" PETSC_ARCH=\"...\" cmake <...>\n" + " $ ccmake -DPETSC_DIR=\"...\" -DPETSC_ARCH=\"...\" cmake <...>\n" + "or set the relevant variables by hand in ccmake.\n\n" + ) +ENDMACRO() + + CONFIGURE_FEATURE(PETSC) diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake index 5e3f4d76c2..899927523c 100644 --- a/deal.II/cmake/setup_finalize.cmake +++ b/deal.II/cmake/setup_finalize.cmake @@ -127,3 +127,4 @@ ENDFOREACH() MESSAGE("\n") +