From b65fe9d370fbd6ca16d0f553c0913f5aa4895600 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20K=C3=B6cher?= Date: Wed, 7 Feb 2018 11:32:57 +0100 Subject: [PATCH] deal.II package: abort package if deal.II v8.5.1 is tried to be configured with cmake 3.10 (or above) --- deal.II-toolchain/packages/dealii.package | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/deal.II-toolchain/packages/dealii.package b/deal.II-toolchain/packages/dealii.package index 4898df7..bdac9ea 100644 --- a/deal.II-toolchain/packages/dealii.package +++ b/deal.II-toolchain/packages/dealii.package @@ -29,6 +29,24 @@ CONFOPTS=" \ -D DEAL_II_WITH_ZLIB:BOOL=ON \ ${DEAL_CONFOPTS}" + +################################################################################ +# Check if we hit cmake-3.10+ and deal.II v8.5.1 configure error (MPI / FindMPI) +# cf. https://github.com/dealii/dealii/issues/5510 + +if [ ${DEAL_II_VERSION} = "v8.5.1" ]; then + # check for cmake version 3.10 and above + CMAKE_VER_MAJOR=$(cmake --version | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/' | cut -d '.' -f1) + CMAKE_VER_MINOR=$(cmake --version | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/' | cut -d '.' -f2) + if [ ${CMAKE_VER_MAJOR}=="3" ] && [ ${CMAKE_VER_MINOR} -gt 9 ]; then + cecho ${BAD} "Error: deal.II v8.5.1 can not be configured with your cmake version." + cecho ${BAD} "Your cmake version is ${CMAKE_VER_MAJOR}.${CMAKE_VER_MINOR}, which is above 3.9." + cecho ${BAD} "Please switch the cmake package in candi.cfg on and run candi again!" + exit 1 + fi +fi + + ################################################################################ # Add additional packages, if present -- 2.39.5