]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
A nice error message for PETSc
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Sep 2012 10:26:44 +0000 (10:26 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Sep 2012 10:26:44 +0000 (10:26 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26715 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_petsc.cmake
deal.II/cmake/setup_finalize.cmake

index a245e4a873be610a3a7aac55cd0f75aab97ef372..4ba04d984173f73b2df8748cdde1f13601511a5f 100644 (file)
@@ -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)
 
index 5e3f4d76c267437d3d4984bdcc509b6714a08de8..899927523cb97fca0eb1172e6745a8dc7a6cfed3 100644 (file)
@@ -127,3 +127,4 @@ ENDFOREACH()
 
 
 MESSAGE("\n")
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.