cmake/SOURCES/0001-FindMPI-Restore-MPI_-LANG-_COMPILE_FLAGS-and-MPI_-LA.patch
2021-10-08 10:07:10 +00:00

34 lines
1.2 KiB
Diff

From 31b8b28fedbf102740eebd7ff9148188ed00a26e Mon Sep 17 00:00:00 2001
From: Robert Maynard <robert.maynard@kitware.com>
Date: Tue, 20 Aug 2019 17:38:53 -0400
Subject: [PATCH] FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS and
MPI_<LANG>_COMPILE_OPTIONS
In commit e374b9f1eb (FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS as a
command-line string, 2018-09-10, v3.12.3~6^2) we tried to restore the
compile flags but accidentally inverted the arguments to `list(JOIN)`
causing both `MPI_<LANG>_COMPILE_FLAGS` and `MPI_<LANG>_COMPILE_OPTIONS`
to be empty.
Issue: #18349
---
Modules/FindMPI.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 9471be8..2b9b20c 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -1698,7 +1698,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}")
unset(MPI_${LANG}_COMPILE_FLAGS)
if(MPI_${LANG}_COMPILE_OPTIONS)
- list(JOIN MPI_${LANG}_COMPILE_FLAGS " " MPI_${LANG}_COMPILE_OPTIONS)
+ list(JOIN MPI_${LANG}_COMPILE_OPTIONS " " MPI_${LANG}_COMPILE_FLAGS)
endif()
if(MPI_${LANG}_COMPILE_DEFINITIONS)
foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS)
--
1.8.3.1