From a285d3da3c9c56055a60f61b8bbc19f3940d4f44 Mon Sep 17 00:00:00 2001 From: maier Date: Sat, 28 Sep 2013 00:19:36 +0000 Subject: [PATCH] CMake: Add minimal version requirement for p4est git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30992 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CTestConfig.cmake | 2 +- deal.II/cmake/configure/configure_p4est.cmake | 27 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/deal.II/CTestConfig.cmake b/deal.II/CTestConfig.cmake index 8b1273e871..24fc9725db 100644 --- a/deal.II/CTestConfig.cmake +++ b/deal.II/CTestConfig.cmake @@ -34,6 +34,6 @@ SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300) SET(CTEST_CUSTOM_COVERAGE_EXCLUDE "/bundled" - "/CMakeFiles/CMakeTmp/" "/contrib" + "/cmake/scripts/" ) diff --git a/deal.II/cmake/configure/configure_p4est.cmake b/deal.II/cmake/configure/configure_p4est.cmake index 9780127bc6..de91ef6ea1 100644 --- a/deal.II/cmake/configure/configure_p4est.cmake +++ b/deal.II/cmake/configure/configure_p4est.cmake @@ -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}) -- 2.39.5