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=ac2398fa0d00e03ae80fef1492ae75eb1aff2ba8;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)