| 
														
															@@ -188,7 +188,7 @@ if (MPI_INCLUDE_PATH AND MPI_LIBRARY) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # the cache, and we don't want to override those settings. 
														 | 
														
														 | 
														
															   # the cache, and we don't want to override those settings. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 elseif (MPI_COMPILE_CMDLINE) 
														 | 
														
														 | 
														
															 elseif (MPI_COMPILE_CMDLINE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # Extract compile flags from the compile command line. 
														 | 
														
														 | 
														
															   # Extract compile flags from the compile command line. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  string(REGEX MATCHALL "(^| )-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   set(MPI_COMPILE_FLAGS_WORK) 
														 | 
														
														 | 
														
															   set(MPI_COMPILE_FLAGS_WORK) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   foreach(FLAG ${MPI_ALL_COMPILE_FLAGS}) 
														 | 
														
														 | 
														
															   foreach(FLAG ${MPI_ALL_COMPILE_FLAGS}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (MPI_COMPILE_FLAGS_WORK) 
														 | 
														
														 | 
														
															     if (MPI_COMPILE_FLAGS_WORK) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -199,10 +199,10 @@ elseif (MPI_COMPILE_CMDLINE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   endforeach(FLAG) 
														 | 
														
														 | 
														
															   endforeach(FLAG) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # Extract include paths from compile command line 
														 | 
														
														 | 
														
															   # Extract include paths from compile command line 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   set(MPI_INCLUDE_PATH_WORK) 
														 | 
														
														 | 
														
															   set(MPI_INCLUDE_PATH_WORK) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   foreach(IPATH ${MPI_ALL_INCLUDE_PATHS}) 
														 | 
														
														 | 
														
															   foreach(IPATH ${MPI_ALL_INCLUDE_PATHS}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    string(REGEX REPLACE "^-I" "" IPATH ${IPATH}) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     string(REGEX REPLACE "//" "/" IPATH ${IPATH}) 
														 | 
														
														 | 
														
															     string(REGEX REPLACE "//" "/" IPATH ${IPATH}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH}) 
														 | 
														
														 | 
														
															     list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   endforeach(IPATH) 
														 | 
														
														 | 
														
															   endforeach(IPATH) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -230,10 +230,10 @@ elseif (MPI_COMPILE_CMDLINE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   endif (NOT MPI_INCLUDE_PATH_WORK) 
														 | 
														
														 | 
														
															   endif (NOT MPI_INCLUDE_PATH_WORK) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # Extract linker paths from the link command line 
														 | 
														
														 | 
														
															   # Extract linker paths from the link command line 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   set(MPI_LINK_PATH) 
														 | 
														
														 | 
														
															   set(MPI_LINK_PATH) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   foreach(LPATH ${MPI_ALL_LINK_PATHS}) 
														 | 
														
														 | 
														
															   foreach(LPATH ${MPI_ALL_LINK_PATHS}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    string(REGEX REPLACE "^-L" "" LPATH ${LPATH}) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     string(REGEX REPLACE "//" "/" LPATH ${LPATH}) 
														 | 
														
														 | 
														
															     string(REGEX REPLACE "//" "/" LPATH ${LPATH}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     list(APPEND MPI_LINK_PATH ${LPATH}) 
														 | 
														
														 | 
														
															     list(APPEND MPI_LINK_PATH ${LPATH}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   endforeach(LPATH) 
														 | 
														
														 | 
														
															   endforeach(LPATH) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -251,7 +251,7 @@ elseif (MPI_COMPILE_CMDLINE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   endif (NOT MPI_LINK_PATH) 
														 | 
														
														 | 
														
															   endif (NOT MPI_LINK_PATH) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # Extract linker flags from the link command line 
														 | 
														
														 | 
														
															   # Extract linker flags from the link command line 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   set(MPI_LINK_FLAGS_WORK) 
														 | 
														
														 | 
														
															   set(MPI_LINK_FLAGS_WORK) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   foreach(FLAG ${MPI_ALL_LINK_FLAGS}) 
														 | 
														
														 | 
														
															   foreach(FLAG ${MPI_ALL_LINK_FLAGS}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (MPI_LINK_FLAGS_WORK) 
														 | 
														
														 | 
														
															     if (MPI_LINK_FLAGS_WORK) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -263,20 +263,20 @@ elseif (MPI_COMPILE_CMDLINE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # Extract the set of libraries to link against from the link command 
														 | 
														
														 | 
														
															   # Extract the set of libraries to link against from the link command 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # line 
														 | 
														
														 | 
														
															   # line 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  string(REGEX MATCHALL "-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # Determine full path names for all of the libraries that one needs 
														 | 
														
														 | 
														
															   # Determine full path names for all of the libraries that one needs 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   # to link against in an MPI program 
														 | 
														
														 | 
														
															   # to link against in an MPI program 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   set(MPI_LIBRARIES) 
														 | 
														
														 | 
														
															   set(MPI_LIBRARIES) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   foreach(LIB ${MPI_LIBNAMES}) 
														 | 
														
														 | 
														
															   foreach(LIB ${MPI_LIBNAMES}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    string(REGEX REPLACE "^-l" "" LIB ${LIB}) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    string(REGEX REPLACE "^ ?-l" "" LIB ${LIB}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) 
														 | 
														
														 | 
														
															     set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     find_library(MPI_LIB ${LIB} HINTS ${MPI_LINK_PATH}) 
														 | 
														
														 | 
														
															     find_library(MPI_LIB ${LIB} HINTS ${MPI_LINK_PATH}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (MPI_LIB) 
														 | 
														
														 | 
														
															     if (MPI_LIB) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       list(APPEND MPI_LIBRARIES ${MPI_LIB}) 
														 | 
														
														 | 
														
															       list(APPEND MPI_LIBRARIES ${MPI_LIB}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    else (MPI_LIB) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      message(SEND_ERROR "Unable to find MPI library ${LIB}") 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    endif (MPI_LIB) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    elseif (NOT MPI_FIND_QUIETLY) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      message(WARNING "Unable to find MPI library ${LIB}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    endif () 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   endforeach(LIB) 
														 | 
														
														 | 
														
															   endforeach(LIB) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI detection" FORCE) 
														 | 
														
														 | 
														
															   set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI detection" FORCE) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |