From: Matthias Maier Date: Mon, 14 Feb 2022 01:03:49 +0000 (-0600) Subject: CMake: Adjust MPI and ZLIB support query for p4est version 2.8 X-Git-Tag: v9.4.0-rc1~481^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13374%2Fhead;p=dealii.git CMake: Adjust MPI and ZLIB support query for p4est version 2.8 --- diff --git a/cmake/modules/FindP4EST.cmake b/cmake/modules/FindP4EST.cmake index a91ef26876..d32cadf281 100644 --- a/cmake/modules/FindP4EST.cmake +++ b/cmake/modules/FindP4EST.cmake @@ -114,7 +114,13 @@ IF(EXISTS ${P4EST_INCLUDE_DIR}/p4est_config.h) FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_MPI_STRING REGEX "#define.*P4EST_MPI 1") IF("${P4EST_MPI_STRING}" STREQUAL "") - SET(P4EST_WITH_MPI FALSE) + FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_MPI_STRING + REGEX "#define.*P4EST_ENABLE_MPI") + IF("${P4EST_MPI_STRING}" STREQUAL "") + SET(P4EST_WITH_MPI FALSE) + ELSE() + SET(P4EST_WITH_MPI TRUE) + ENDIF() ELSE() SET(P4EST_WITH_MPI TRUE) ENDIF() @@ -123,7 +129,7 @@ IF(EXISTS ${P4EST_INCLUDE_DIR}/p4est_config.h) # Is p4est built against zlib? # FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_ZLIB_STRING - REGEX "#define.*P4EST_HAVE_ZLIB 1") + REGEX "^#define.*P4EST_HAVE_ZLIB") IF("${P4EST_ZLIB_STRING}" STREQUAL "") SET(P4EST_WITH_ZLIB FALSE) ELSE()