From 66944bcb39a3c458484b7a8c081c5114af0849cb Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 27 Sep 2018 04:26:03 +0200 Subject: [PATCH] Add PETSc check --- cmake/configure/configure_3_petsc.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cmake/configure/configure_3_petsc.cmake b/cmake/configure/configure_3_petsc.cmake index 0f1e6433ec..f95de0331a 100644 --- a/cmake/configure/configure_3_petsc.cmake +++ b/cmake/configure/configure_3_petsc.cmake @@ -94,6 +94,25 @@ MACRO(FEATURE_PETSC_FIND_EXTERNAL var) SET(${var} FALSE) ENDIF() + # If PETSc is compiled with complex scalar type we need to have support + # for complex values within deal.II as well. + # + IF( PETSC_WITH_COMPLEX AND NOT DEAL_II_WITH_COMPLEX_VALUES ) + MESSAGE(STATUS "The PETSc configuration is incompatible with the deal.II configuration: " + "PETSc is compiled with complex scalar type. " + "This requites support for complex values in deal.II as well." + ) + SET(PETSC_ADDITIONAL_ERROR_STRING + ${PETSC_ADDITIONAL_ERROR_STRING} + "The PETSc configuration is incompatible with the deal.II configuration:\n" + "PETSc is compiled with complex scalar type. " + "This requites support for complex values in deal.II as well.\n" + " DEAL_II_WITH_COMPLEX_VALUES = ${DEAL_II_WITH_COMPLEX_VALUES}\n" + " PETSC_WITH_COMPLEX = (${PETSC_WITH_COMPLEX})\n" + ) + SET(${var} FALSE) + ENDIF() + CHECK_MPI_INTERFACE(PETSC ${var}) ENDIF() ENDMACRO() -- 2.39.5