]> https://gitweb.dealii.org/ - dealii.git/commitdiff
allow oevrriding MPIEXEC from an environment varible 2071/head
authorDenis Davydov <davydden@gmail.com>
Sun, 17 Jan 2016 09:51:21 +0000 (10:51 +0100)
committerDenis Davydov <davydden@gmail.com>
Sun, 17 Jan 2016 09:51:21 +0000 (10:51 +0100)
cmake/modules/FindMPI.cmake

index 4e45a53bd817c65277e505a2a0348f5caf38a2c8..2f781eb1b848adf5556532dc9f8bf32b4a08ad45 100644 (file)
@@ -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)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.