From: NDJINGA Michael Date: Thu, 20 Jan 2022 13:49:50 +0000 (+0100) Subject: Corrected MPI detection X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee534712e66c944ad5236d643ad52d82686fa6e0;p=tools%2Fsolverlab.git Corrected MPI detection --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bd890b5..237fb47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,9 +60,13 @@ list (APPEND CMAKE_MODULE_PATH "${SOLVERLAB_SOURCE_DIR}/cmake_files") ############################# # Detection of MPI + MPI4PY # ############################# -if ( DEFINED MPI_ROOT_DIR ) - set(MPI_HOME ${MPI_ROOT_DIR}) -endif( DEFINED MPI_ROOT_DIR ) +if ( DEFINED ENV{MPI_ROOT_DIR} OR DEFINED MPI_ROOT_DIR ) + if ( DEFINED ENV{MPI_ROOT_DIR} ) + set(MPI_HOME $ENV{MPI_ROOT_DIR}) + else ( DEFINED ENV{MPI_ROOT_DIR} ) + set(MPI_HOME ${MPI_ROOT_DIR}) + endif( DEFINED ENV{MPI_ROOT_DIR} ) +endif( DEFINED ENV{MPI_ROOT_DIR} OR DEFINED MPI_ROOT_DIR ) # Definition of SOLVERLAB_WITH_MPI if( DEFINED ENV{MPI_HOME} OR MPI_HOME )