]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Adding checks for requirement of p4est, Trilinos, Petsc
authorWasim Niyaz Munshi <munshiw0@gmail.com>
Sat, 7 Dec 2024 00:05:07 +0000 (17:05 -0700)
committerWasim Niyaz Munshi <munshiw0@gmail.com>
Sat, 7 Dec 2024 00:05:07 +0000 (17:05 -0700)
Phase_field_fracture_model_in_3D/CMakeLists.txt

index 64c44975a6c1ed1d67166fc4a75b5d75eb5a8b1b..e4424562def77333c8f787eb95d6b2e84c41f3ba 100644 (file)
@@ -1,5 +1,5 @@
 ##
-#  CMake script for the step-854 tutorial program:
+#  CMake script for the phase_field program:
 ##
 
 # Set the name of the project and target:
@@ -34,6 +34,28 @@ IF(NOT ${deal.II_FOUND})
     )
 ENDIF()
 
+#
+# Are all dependencies fulfilled?
+#
+if(NOT ((DEAL_II_WITH_PETSC AND NOT DEAL_II_PETSC_WITH_COMPLEX) OR DEAL_II_WITH_TRILINOS) OR NOT DEAL_II_WITH_P4EST)
+  message(FATAL_ERROR "
+Error! This tutorial requires a deal.II library that was configured with the following options:
+    DEAL_II_WITH_PETSC = ON
+    DEAL_II_PETSC_WITH_COMPLEX = OFF
+    DEAL_II_WITH_P4EST = ON
+or
+    DEAL_II_WITH_TRILINOS = ON
+    DEAL_II_WITH_P4EST = ON
+However, the deal.II library found at ${DEAL_II_PATH} was configured with these options:
+    DEAL_II_WITH_PETSC = ${DEAL_II_WITH_PETSC}
+    DEAL_II_PETSC_WITH_COMPLEX = ${DEAL_II_PETSC_WITH_COMPLEX}
+    DEAL_II_WITH_P4EST = ${DEAL_II_WITH_P4EST}
+    DEAL_II_WITH_TRILINOS = ${DEAL_II_WITH_TRILINOS}
+This conflicts with the requirements.
+One or both of the aforementioned combinations of prerequisites are not met by your installation, but at least one is required for this tutorial step."
+    )
+endif()
+
 DEAL_II_INITIALIZE_CACHED_VARIABLES()
 PROJECT(${TARGET})
 DEAL_II_INVOKE_AUTOPILOT()

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.