Update of /cvsroot/boost/boost/tools/build/v2/tools
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6526
Modified Files:
mpi.jam
Log Message:
Robustify MPI auto-detection a bit
Index: mpi.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/mpi.jam,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mpi.jam 12 Dec 2006 00:45:16 -0000 1.1
+++ mpi.jam 12 Dec 2006 01:02:50 -0000 1.2
@@ -198,8 +198,6 @@
# Initialize the MPI module.
rule init ( mpicxx ? : options * )
{
- .configured = true ;
-
if ! $(options)
{
if $(.debug-configuration)
@@ -210,14 +208,24 @@
# Try to auto-detect options based on the wrapper compiler
local command = [ common.get-invocation-command mpi : mpic++ : $(mpicxx) ]
;
+ if ! $(mpicxx) && ! $(command)
+ {
+ # Try "mpiCC", which is used by MPICH
+ command = [ common.get-invocation-command mpi : mpiCC ] ;
+ }
+
local result ;
local compile_flags ;
local link_flags ;
+ if ! $(command)
+ {
+ # Do nothing: we'll complain later
+ }
# OpenMPI and newer versions of LAM-MPI have -showme:compile and
# -showme:link.
- if [ safe-shell-command "$(command) -showme:compile" ] &&
- [ safe-shell-command "$(command) -showme:link" ]
+ else if [ safe-shell-command "$(command) -showme:compile" ] &&
+ [ safe-shell-command "$(command) -showme:link" ]
{
if $(.debug-configuration)
{
@@ -293,24 +301,41 @@
echo "MPI build features: " ;
ECHO $(options) ;
}
- } else {
- ECHO "MPI auto-detection failed." ;
+ }
+ else
+ {
+ if $(command)
+ {
+ ECHO "MPI auto-detection failed: unknown wrapper compiler $(command)" ;
+ ECHO "Please report this error to the Boost mailing list:
http://www.boost.org" ;
+ }
+ else if $(mpicxx)
+ {
+ ECHO "MPI auto-detection failed: unable to find wrapper compiler
$(mpicxx)" ;
+ }
+ else
+ {
+ ECHO "MPI auto-detection failed: unable to find wrapper compiler
`mpic++' or `mpiCC'" ;
+ }
ECHO "You will need to manually configure MPI support." ;
}
+ if $(options)
+ {
+ .configured = true ;
+
+ # Set up the "mpi" alias
+ alias mpi : : : : $(options) ;
+ }
+
if $(.debug-configuration)
{
ECHO "====================================================" ;
}
}
-
- # Set up the "mpi" alias
- alias mpi : : : : $(options) ;
}
rule configured ( )
{
return $(.configured) ;
}
-
-# IMPORT $(__name__) : configured : : configured ;
\ No newline at end of file
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs