summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-30 14:07:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-04-30 14:08:22 (GMT)
commit60515b205e0151fa0194a984850e652a04a9a165 (patch)
treecd7ae0fdc742d6f3d06ef036383319485a629c00 /Modules
parentd9a4da453fb6fe2a5f16eb35a0d3756f88801ba1 (diff)
parent7db32efbab1c61e4b8032702eba5ac6d7768d531 (diff)
downloadCMake-60515b205e0151fa0194a984850e652a04a9a165.zip
CMake-60515b205e0151fa0194a984850e652a04a9a165.tar.gz
CMake-60515b205e0151fa0194a984850e652a04a9a165.tar.bz2
Merge topic 'findmpi-msvc-nolibdir'
7db32efbab FindMPI: Don't retain libdirs for Win32 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3253
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMPI.cmake26
1 files changed, 14 insertions, 12 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 8c45a8c..5288640 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -770,18 +770,20 @@ function (_MPI_interrogate_compiler LANG)
endforeach()
# Add the link directories given explicitly that we haven't used back as linker directories.
- foreach(_MPI_LINK_DIRECTORY IN LISTS MPI_LINK_DIRECTORIES_LEFTOVER)
- file(TO_NATIVE_PATH "${_MPI_LINK_DIRECTORY}" _MPI_LINK_DIRECTORY_ACTUAL)
- string(FIND "${_MPI_LINK_DIRECTORY_ACTUAL}" " " _MPI_LINK_DIRECTORY_CONTAINS_SPACE)
- if(NOT _MPI_LINK_DIRECTORY_CONTAINS_SPACE EQUAL -1)
- set(_MPI_LINK_DIRECTORY_ACTUAL "\"${_MPI_LINK_DIRECTORY_ACTUAL}\"")
- endif()
- if(MPI_LINK_FLAGS_WORK)
- string(APPEND MPI_LINK_FLAGS_WORK " ${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}")
- else()
- set(MPI_LINK_FLAGS_WORK "${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}")
- endif()
- endforeach()
+ if(NOT WIN32)
+ foreach(_MPI_LINK_DIRECTORY IN LISTS MPI_LINK_DIRECTORIES_LEFTOVER)
+ file(TO_NATIVE_PATH "${_MPI_LINK_DIRECTORY}" _MPI_LINK_DIRECTORY_ACTUAL)
+ string(FIND "${_MPI_LINK_DIRECTORY_ACTUAL}" " " _MPI_LINK_DIRECTORY_CONTAINS_SPACE)
+ if(NOT _MPI_LINK_DIRECTORY_CONTAINS_SPACE EQUAL -1)
+ set(_MPI_LINK_DIRECTORY_ACTUAL "\"${_MPI_LINK_DIRECTORY_ACTUAL}\"")
+ endif()
+ if(MPI_LINK_FLAGS_WORK)
+ string(APPEND MPI_LINK_FLAGS_WORK " ${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}")
+ else()
+ set(MPI_LINK_FLAGS_WORK "${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}")
+ endif()
+ endforeach()
+ endif()
# Deal with the libraries given with full path next
unset(MPI_DIRECT_LIB_NAMES_WORK)