summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-09-09 19:29:05 (GMT)
committerBrad King <brad.king@kitware.com>2010-09-20 13:08:08 (GMT)
commita56969f3d3dcd6f711b8f1881f0258ec4a333373 (patch)
treea67fba3ff0f8a27fb59a9e281e9c9d90fd13e305 /Modules/FindMPI.cmake
parentf444b9555f87ec187bff51d48cd29c22ab4a6121 (diff)
downloadCMake-a56969f3d3dcd6f711b8f1881f0258ec4a333373.zip
CMake-a56969f3d3dcd6f711b8f1881f0258ec4a333373.tar.gz
CMake-a56969f3d3dcd6f711b8f1881f0258ec4a333373.tar.bz2
FindMPI: Recoginze -f flags from mpicc (#10771)
Parse compiler flags like "-fmessage-length=0 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing" from the output of "mpicc -show". We already handle preprocessor definition arguments like -DUSE_STDARG. Honor '-f' flags too.
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r--Modules/FindMPI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 45d6bff..9fef8f9 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -188,7 +188,7 @@ if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
# the cache, and we don't want to override those settings.
elseif (MPI_COMPILE_CMDLINE)
# Extract compile flags from the compile command line.
- string(REGEX MATCHALL "(^| )-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
+ string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
set(MPI_COMPILE_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
if (MPI_COMPILE_FLAGS_WORK)