summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduard Valeyev <eduard@valeyev.net>2020-12-27 18:54:55 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-04 19:13:43 (GMT)
commita5b223aa7f946d774548bc22e7df6319ba6db134 (patch)
treea8559f79be6b4f01a41d53e687f74285160670ef
parent511158a03ba52c38b68e938704b07718dd3e6786 (diff)
downloadCMake-a5b223aa7f946d774548bc22e7df6319ba6db134.zip
CMake-a5b223aa7f946d774548bc22e7df6319ba6db134.tar.gz
CMake-a5b223aa7f946d774548bc22e7df6319ba6db134.tar.bz2
FindMPI: remove single quotes from include path
Intel OneAPI's MPI wraps include paths into single quotes, remove them when sanitizing _MPI_INCLUDE_PATH Fixes: #21634
-rw-r--r--Modules/FindMPI.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index b531e47..789a72e 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -646,6 +646,7 @@ function (_MPI_interrogate_compiler LANG)
foreach(_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS)
string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}")
string(REPLACE "\"" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}")
+ string(REPLACE "'" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}")
get_filename_component(_MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}" REALPATH)
list(APPEND MPI_INCLUDE_DIRS_WORK "${_MPI_INCLUDE_PATH}")
endforeach()