diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 815cda8ab..627effce1 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -148,7 +148,8 @@ elseif (MPI_COMPILE_CMDLINE) set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND") endif (MPI_NUMLIBS GREATER 0) if (MPI_NUMLIBS GREATER 1) - cdr(MPI_EXTRA_LIBRARY ${MPI_LIBRARIES}) + set(MPI_EXTRA_LIBRARY ${MPI_LIBRARIES}) + list(REMOVE_AT MPI_EXTRA_LIBRARY 0) else (MPI_NUMLIBS GREATER 1) set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") endif (MPI_NUMLIBS GREATER 1)