blob: 72d66d7ecb4ddf65c10dfebc2df3345339613fd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 354cdd6730ac1cc19cbf99e663e7ca280a9b62dc Mon Sep 17 00:00:00 2001
From: Matthias Maier <tamiko@43-1.org>
Date: Sun, 13 Feb 2022 19:03:49 -0600
Subject: [PATCH] CMake: Adjust MPI and ZLIB support query for p4est version
2.8
---
cmake/modules/FindP4EST.cmake | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
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()
--
2.34.1
|