浏览代码

FindMPI: Append MPI C++ library correctly in non-compiler case (#12874)

When we have no MPI compiler wrapper and search explicitly for the MPI
C++ library append it correctly to the list of libraries instead of
using a space.

Suggested-by: Mourad Boufarguine <[email protected]>
Brad King 14 年之前
父节点
当前提交
87737e62e0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Modules/FindMPI.cmake

+ 1 - 1
Modules/FindMPI.cmake

@@ -413,7 +413,7 @@ function (interrogate_mpi_compiler lang try_libs)
           HINTS         ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
           PATH_SUFFIXES lib)
         if (MPI_LIBRARIES_WORK AND MPI_LIB)
-          set(MPI_LIBRARIES_WORK "${MPI_LIBRARIES_WORK} ${MPI_LIB}")
+          list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
         endif()
       endif()