Even though we might not necessarily use zlib compression in p4est
output at all, p4est might silently fail if zlib support is disabled.
Work around this issue by always requiring a p4est installation with
enabled zlib support.
Closes #4151
SET(${var} FALSE)
ENDIF()
+ #
+ # Check whether p4est is built against zlib:
+ #
+ IF(NOT P4EST_WITH_ZLIB)
+ MESSAGE(STATUS "Insufficient p4est installation found: "
+ "p4est has to be configured with enabled zlib support."
+ )
+ SET(P4EST_ADDITIONAL_ERROR_STRING
+ ${P4EST_ADDITIONAL_ERROR_STRING}
+ "Insufficient p4est installation found!\n"
+ "p4est has to be configured with enabled zlib support.\n"
+ )
+ SET(${var} FALSE)
+ ENDIF()
+
CHECK_MPI_INTERFACE(P4EST ${var})
ENDIF()
ENDMACRO()
# P4EST_LIBRARIES
# P4EST_INCLUDE_DIRS
# P4EST_WITH_MPI
+# P4EST_WITH_ZLIB
# P4EST_VERSION
# P4EST_VERSION_MAJOR
# P4EST_VERSION_MINOR
SET(P4EST_WITH_MPI TRUE)
ENDIF()
+ #
+ # Is p4est built against zlib?
+ #
+ FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_ZLIB_STRING
+ REGEX "#define.*P4EST_HAVE_ZLIB 1")
+ IF("${P4EST_ZLIB_STRING}" STREQUAL "")
+ SET(P4EST_WITH_ZLIB FALSE)
+ ELSE()
+ SET(P4EST_WITH_ZLIB TRUE)
+ ENDIF()
+
#
# Extract version numbers:
#
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams