Skip to content

Commit d6e797a

Browse files
abouteillerzbeekman
authored andcommitted
Correct detection of Open MPI in CMakeLists
Signed-off-by: Aurelien Bouteiller <[email protected]> (cherry picked from commit 9138b1c)
1 parent c8d585b commit d6e797a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mpi/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ else()
8282
endif()
8383

8484
set(MPI_HEADERS mpi.h)
85-
CHECK_INCLUDE_FILE("mpi-ext.h" HAVE_MPI_EXT)
85+
include(CheckIncludeFiles)
86+
CHECK_INCLUDE_FILES("mpi.h;mpi-ext.h" HAVE_MPI_EXT)
8687
if(HAVE_MPI_EXT)
8788
add_definitions(-DHAVE_MPI_EXT_H)
8889
set(MPI_HEADERS ${MPI_HEADERS};mpi-ext.h)
8990
endif()
9091

9192
foreach(symbol ${NEEDED_SYMBOLS})
92-
CHECK_SYMBOL_EXISTS(${symbol} ${MPI_HEADERS} HAVE_${symbol})
93+
CHECK_SYMBOL_EXISTS(${symbol} "${MPI_HEADERS}" HAVE_${symbol})
9394
if(NOT HAVE_${symbol})
9495
message( STATUS "\${HAVE_${symbol}} = ${HAVE_${symbol}}")
9596
message( WARNING "Disabling Failed Image support due to lack of support in the current MPI implementation.")

0 commit comments

Comments
 (0)