From: Uwe Köcher Date: Wed, 7 Feb 2018 10:32:57 +0000 (+0100) Subject: deal.II package: abort package if deal.II v8.5.1 is tried to be configured with cmake... X-Git-Tag: v8.5.1~5^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b65fe9d370fbd6ca16d0f553c0913f5aa4895600;p=candi.git deal.II package: abort package if deal.II v8.5.1 is tried to be configured with cmake 3.10 (or above) --- 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