mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Improve detection of MT requirement of MPI.
Some MPI implementation report -lpthread in the compilation flags. Previously, we'd add -lpthread, but did not set threading=multi, as we really should. One manifestation of this issue is that when building with such an MPI, and requesting "threading=single threading=multi", we'd actually try to build two variants of everything, including "mpi.so" Python extension. And since Python extensions, at present, do not have their name adjusted for different variants, we'd get duplicate target name error. [SVN r57791]
This commit is contained in:
@@ -163,7 +163,20 @@ rule cmdline_to_features ( cmdline : unknown-features ? )
|
||||
local add = [ add_feature $(prefix) $(name) $(cmdline) ] ;
|
||||
|
||||
if $(add) {
|
||||
result += $(add[1]) ;
|
||||
|
||||
if $(add[1]) = <find-shared-library>pthread
|
||||
{
|
||||
# Uhm. It's not really nice that this MPI implementation
|
||||
# uses -lpthread as opposed to -pthread. We do want to
|
||||
# set <threading>multi, instead of -lpthread.
|
||||
result += "<threading>multi" ;
|
||||
MPI_EXTRA_REQUIREMENTS += "<threading>multi" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += $(add[1]) ;
|
||||
}
|
||||
|
||||
cmdline = $(add[2]) ;
|
||||
matched = yes ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user