From 2fc90fda10a36eed4f97d2ebc2875cfdb4d0133d Mon Sep 17 00:00:00 2001 From: Wasim Niyaz Munshi Date: Fri, 6 Dec 2024 17:05:07 -0700 Subject: [PATCH] Adding checks for requirement of p4est, Trilinos, Petsc --- .../CMakeLists.txt | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Phase_field_fracture_model_in_3D/CMakeLists.txt b/Phase_field_fracture_model_in_3D/CMakeLists.txt index 64c4497..e442456 100644 --- a/Phase_field_fracture_model_in_3D/CMakeLists.txt +++ b/Phase_field_fracture_model_in_3D/CMakeLists.txt @@ -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() -- 2.39.5