From 887468c9f19383e028ec3234d7bd277d5bbb779b Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 25 Sep 2012 10:26:44 +0000 Subject: [PATCH] A nice error message for PETSc git-svn-id: https://svn.dealii.org/branches/branch_cmake@26715 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/configure/configure_petsc.cmake | 20 +++++++++++++++++++ deal.II/cmake/setup_finalize.cmake | 1 + 2 files changed, 21 insertions(+) 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") + -- 2.39.5