The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14322 
====================================================================== 
Reported By:                higgins
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14322
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-07-30 11:08 EDT
Last Modified:              2013-07-30 11:08 EDT
====================================================================== 
Summary:                    FindMPI.cmake does not produce a complete list of
compile and link flags (-pthread missing)
Description: 
Openmpi produces the following

mpic++ --showme:compile
-I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread

mpic++ --showme:link
-pthread -L/usr/lib/openmpi/lib -lmpi_cxx -lmpi -lopen-rte -lopen-pal -ldl
-Wl,--export-dynamic -lnsl -lutil -lm -ldl

However, the regex code in FindMPI.cmake fails to pick-up flags that start with
p.

Additional Information: 
To pick up flags starting with p I changed the following lines in FindMPI.cmake.

        # Extract include paths from compile command line
#ORIGINAL string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")"
MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
          string(REGEX MATCHALL "(^| )-[Dfp]([^\" ]+|\"[^\"]+\")"
MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")

        # Extract linker flags from the link command line
#ORIGINAL string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")"
MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
          string(REGEX MATCHALL "(^| )-[pWl]([^\" ]+|\"[^\"]+\")"
MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-07-30 11:08 higgins        New Issue                                    
======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to