From: Denis Davydov Date: Sun, 17 Jan 2016 09:51:21 +0000 (+0100) Subject: allow oevrriding MPIEXEC from an environment varible X-Git-Tag: v8.4.0-rc2~89^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2071%2Fhead;p=dealii.git allow oevrriding MPIEXEC from an environment varible --- diff --git a/cmake/modules/FindMPI.cmake b/cmake/modules/FindMPI.cmake index 4e45a53bd8..2f781eb1b8 100644 --- a/cmake/modules/FindMPI.cmake +++ b/cmake/modules/FindMPI.cmake @@ -64,6 +64,12 @@ ENDIF() # Call the system FindMPI.cmake module: # +# in case MPIEXEC is specified first call find_program() so that in case of success +# its subsequent runs inside FIND_PACKAGE(MPI) do not alter the desired result. +IF(DEFINED ENV{MPIEXEC}) + FIND_PROGRAM(MPIEXEC $ENV{MPIEXEC}) +ENDIF() + # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) FIND_PACKAGE(MPI)