]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Add minimal version requirement for p4est
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sat, 28 Sep 2013 00:19:36 +0000 (00:19 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sat, 28 Sep 2013 00:19:36 +0000 (00:19 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30992 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CTestConfig.cmake
deal.II/cmake/configure/configure_p4est.cmake

index 8b1273e8711b2966d14527801aa4dcdbafe5a8bd..24fc9725db6e40f3cc05abf9e3f3b4bef954271f 100644 (file)
@@ -34,6 +34,6 @@ SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300)
 
 SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
   "/bundled"
-  "/CMakeFiles/CMakeTmp/"
   "/contrib"
+  "/cmake/scripts/"
   )
index 9780127bc6d157952aecec14369f96b7cd6cd7e8..de91ef6ea130537543702992bcbb69bf2c88aa20 100644 (file)
@@ -24,6 +24,22 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
   FIND_PACKAGE(P4EST)
 
   IF(P4EST_FOUND)
+    SET(${var} TRUE)
+
+    #
+    # We require at least version 0.3.4.1
+    #
+    IF(P4EST_VERSION VERSION_LESS  "0.3.4.1")
+      MESSAGE(STATUS "Insufficient p4est installation found: "
+        "At least version 0.3.4.1 is required."
+        )
+      SET(P4EST_ADDITIONAL_ERROR_STRING
+        "Insufficient p4est installation found!\n"
+        "At least version 0.3.4.1 is required.\n"
+        )
+      SET(${var} FALSE)
+    ENDIF()
+
     #
     # Check whether p4est supports mpi:
     #
@@ -32,10 +48,17 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
         "p4est has to be configured with MPI enabled."
         )
       SET(P4EST_ADDITIONAL_ERROR_STRING
+        ${P4EST_ADDITIONAL_ERROR_STRING}
         "Insufficient p4est installation found!\n"
         "p4est has to be configured with MPI enabled.\n"
         )
+      SET(${var} FALSE)
+    ENDIF()
 
+    #
+    # Reset configuration:
+    #
+    IF(NOT ${var})
       UNSET(P4EST_LIBRARY_OPTIMIZED CACHE)
       UNSET(P4EST_LIBRARY_DEBUG CACHE)
       UNSET(P4EST_INCLUDE_DIR CACHE)
@@ -46,12 +69,12 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var)
         "An optional hint to a p4est installation/directory"
         )
       MARK_AS_ADVANCED(CLEAR P4EST_DIR)
-    ELSE()
-      SET(${var} TRUE)
     ENDIF()
+
   ENDIF()
 ENDMACRO()
 
+
 MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL)
   INCLUDE_DIRECTORIES(${P4EST_INCLUDE_DIRS})
 

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.