]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Recognize old-style p4est directory layout and work with it.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 4 Nov 2012 19:04:46 +0000 (19:04 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 4 Nov 2012 19:04:46 +0000 (19:04 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@27348 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/modules/FindP4EST.cmake

index 1d25b383f768a7b146aeadd51d2a17fd2888a82a..1926639e6452ce777dba6cfb7069f9f86ceab09f 100644 (file)
@@ -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

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


Typeset in Trocchi and Trocchi Bold Sans Serif.