From: bangerth Date: Sun, 4 Nov 2012 19:04:46 +0000 (+0000) Subject: Recognize old-style p4est directory layout and work with it. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0edc00d0fd4d1275a9946172bcb5a718ea96c037;p=dealii-svn.git Recognize old-style p4est directory layout and work with it. git-svn-id: https://svn.dealii.org/branches/branch_cmake@27348 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/modules/FindP4EST.cmake b/deal.II/cmake/modules/FindP4EST.cmake index 1d25b383f7..1926639e64 100644 --- a/deal.II/cmake/modules/FindP4EST.cmake +++ b/deal.II/cmake/modules/FindP4EST.cmake @@ -26,8 +26,30 @@ INCLUDE(FindPackageHandleStandardArgs) SET_IF_EMPTY(P4EST_DIR "$ENV{P4EST_DIR}") # -# Search for the sc library, usually bundled with p4est: +# We used to recommend installing p4est with a custom script that +# compiled p4est twice, once in debug and once in optimized mode. +# the installation would then have happened into directories +# $P4EST_DIR/DEBUG and $P4EST_DIR/FAST. If we can find these +# two directories, then use the FAST directory rather than trying +# to figure out how we can build deal.II against the two libraries +# depending on whether we are in debug or optimized mode. # +IF (P4EST_DIR + AND + EXISTS ${P4EST_DIR}/DEBUG + AND + EXISTS ${P4EST_DIR}/FAST) + MESSAGE("-- Found old-style p4est directory layout") + SET (P4EST_DIR ${P4EST_DIR}/FAST) +ENDIF() + + +# +# Search for the sc library, usually bundled with p4est. If no SC_DIR was +# given, take what we chose for p4est. +# +SET_IF_EMPTY(SC_DIR "$ENV{SC_DIR}") +SET_IF_EMPTY(SC_DIR "${P4EST_DIR}") FIND_PACKAGE(SC) FIND_PATH(P4EST_INCLUDE_DIR p4est.h