From: Daniel Arndt Date: Thu, 27 Sep 2018 02:26:03 +0000 (+0200) Subject: Add PETSc check X-Git-Tag: v9.1.0-rc1~621^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66944bcb39a3c458484b7a8c081c5114af0849cb;p=dealii.git Add PETSc check --- 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()