MantisBT - CMake
View Issue Details
0009325CMakeModulespublic2009-07-28 14:132016-06-10 14:30
Francois-Michel De Rainville 
David Partyka 
normalminoralways
closedmoved 
CMake-2-6 
 
0009325: Under Os X, FindMPI.cmake use regex that Os X don't seem to recognize
# Extract linker flags from the link command line
string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")

when adding those two lines
     message("${MPI_LINK_CMDLINE}")
     message("${MPI_ALL_LINK_FLAGS}")
MPI_LINK_CMDLINE = -fexceptions -lmpi_cxx -lmpi -lopen-rte -lopen-pal -lutil
but MPI_ALL_LINK_FLAGS is empty, it leads to an error when adding dependancies to a project
set_target_properties(project PROPERTIES LINK_FLAGS ${MPI_LINK_FLAGS})
Every other regex in FindMPI seems to work fine.
No tags attached.
Issue History
2009-07-28 14:13Francois-Michel De RainvilleNew Issue
2009-09-14 13:12Bill HoffmanStatusnew => assigned
2009-09-14 13:12Bill HoffmanAssigned To => Douglas Gregor
2010-03-05 00:50Francois-Michel De RainvilleNote Added: 0019720
2010-03-05 01:03Francois-Michel De RainvilleNote Edited: 0019720
2010-12-08 10:34David ColeAssigned ToDouglas Gregor =>
2010-12-08 10:34David ColeStatusassigned => new
2010-12-08 10:45David ColeStatusnew => assigned
2010-12-08 10:45David ColeAssigned To => David Partyka
2016-06-10 14:27Kitware RobotNote Added: 0041582
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0019720)
Francois-Michel De Rainville   
2010-03-05 00:50   
(edited on: 2010-03-05 01:03)
Here is a hack to get around this problem,

First : On Mac OS X, OpenMPI is preinstalled in /usr/include and /usr/lib so mpiCC -showme:compile does not contain any include directory and the include files are accessible throught the PATH. So in order to have a valid MPI_INCLUDE_PATH simply add at line 151 :

list(APPEND MPI_INCLUDE_PATH_WORK " ")

The last line is realy a hack and may produce strange behavior. Second modify the regular expression at line 193 :

string(REGEX MATCHALL "-Wl|-l,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")

(0041582)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.