From: Matthias Maier Date: Wed, 13 Jul 2016 14:50:25 +0000 (-0500) Subject: CMake: Add a check to ensure a working MPI interface X-Git-Tag: v8.5.0-rc1~875^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=654851ee0b7715f5356eb1389df64755becd7a80;p=dealii.git CMake: Add a check to ensure a working MPI interface --- diff --git a/cmake/configure/configure_1_mpi.cmake b/cmake/configure/configure_1_mpi.cmake index 781c47c806..6254ec58e5 100644 --- a/cmake/configure/configure_1_mpi.cmake +++ b/cmake/configure/configure_1_mpi.cmake @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2012 - 2015 by the deal.II authors +## Copyright (C) 2012 - 2016 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -28,7 +28,25 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var) "Could not find a sufficient MPI version: " "Your MPI implementation must define MPI_SEEK_SET.") SET(MPI_ADDITIONAL_ERROR_STRING - "Your MPI implementation must define MPI_SEEK_SET.") + "Your MPI implementation must define MPI_SEEK_SET.\n") + SET(${var} FALSE) + ENDIF() + + CHECK_COMPILER_SETUP( + "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_SAVED} ${MPI_CXX_FLAGS}" + "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_SAVED} ${MPI_LINKER_FLAGS}" + MPI_WORKING_COMPILER + ${DEAL_II_LIBRARIES} ${MPI_LIBRARIES} + ) + + IF(NOT MPI_WORKING_COMPILER) + MESSAGE(STATUS "Could not find a sufficient MPI installation: " + "Unable to compile a simple test program." + ) + SET(MPI_ADDITIONAL_ERROR_STRING + ${MPI_ADDITIONAL_ERROR_STRING} + "Unable to compile and link a simple test program with your MPI installation. \n" + ) SET(${var} FALSE) ENDIF() ENDIF()