From e8cc7789ee1c5a0bd6b1a88b60a395d282d83ecd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20K=C3=B6cher?= Date: Tue, 6 Feb 2018 10:38:12 +0100 Subject: [PATCH] check if cmake 3.10 (or above) used with deal.II v8.5.1 and outputs useful hints to resolve the find mpi problem --- deal.II-toolchain/packages/dealii-prepare.package | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/deal.II-toolchain/packages/dealii-prepare.package b/deal.II-toolchain/packages/dealii-prepare.package index 8f5b845..0f5e241 100644 --- a/deal.II-toolchain/packages/dealii-prepare.package +++ b/deal.II-toolchain/packages/dealii-prepare.package @@ -26,4 +26,19 @@ if [ ! -z "${PACKAGES_OFF}" ]; then read fi +# 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} "Your cmake version is ${CMAKE_VER_MAJOR}.${CMAKE_VER_MINOR}, which is above 3.9." + cecho ${INFO} "You need to switch on the cmake package in the config file!" + cecho ${GOOD} "Please confirm this by pressing enter ..." + read + fi +fi + PACKAGE=dealii-prepare -- 2.39.5