summaryrefslogtreecommitdiff
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-20 13:39:06 -0400
committerBrad King <brad.king@kitware.com>2020-04-20 13:39:06 -0400
commitfaa0c62106591a3eb88316bde2eaf90ab44dc1d4 (patch)
treecd8418eeef6375a38a254cfd8d823ab5e7af4bbc /Modules/FindMPI.cmake
parent5d32699975d8623c19f74c75f22ee128a81508c8 (diff)
downloadcmake-faa0c62106591a3eb88316bde2eaf90ab44dc1d4.tar.gz
FindMPI: Normalize paths from MSMPI environment variables
Fixes: #20606
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r--Modules/FindMPI.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index cdbb927028..e9b6bd2c1a 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -867,11 +867,11 @@ function(_MPI_guess_settings LANG)
# We first attempt to locate the msmpi.lib. Should be find it, we'll assume that the MPI present is indeed
# Microsoft MPI.
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
- set(MPI_MSMPI_LIB_PATH "$ENV{MSMPI_LIB64}")
- set(MPI_MSMPI_INC_PATH_EXTRA "$ENV{MSMPI_INC}/x64")
+ file(TO_CMAKE_PATH "$ENV{MSMPI_LIB64}" MPI_MSMPI_LIB_PATH)
+ file(TO_CMAKE_PATH "$ENV{MSMPI_INC}/x64" MPI_MSMPI_INC_PATH_EXTRA)
else()
- set(MPI_MSMPI_LIB_PATH "$ENV{MSMPI_LIB32}")
- set(MPI_MSMPI_INC_PATH_EXTRA "$ENV{MSMPI_INC}/x86")
+ file(TO_CMAKE_PATH "$ENV{MSMPI_LIB32}" MPI_MSMPI_LIB_PATH)
+ file(TO_CMAKE_PATH "$ENV{MSMPI_INC}/x86" MPI_MSMPI_INC_PATH_EXTRA)
endif()
find_library(MPI_msmpi_LIBRARY