From 8dcc9ce950f3e305e20537bebc72267f6c333639 Mon Sep 17 00:00:00 2001 From: "K. Noel Belcourt" Date: Fri, 16 May 2014 21:29:39 -0600 Subject: [PATCH] Begin adding Cray support to MPI jam. --- src/tools/mpi.jam | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/tools/mpi.jam b/src/tools/mpi.jam index 4ba6aec6b..a161101bc 100644 --- a/src/tools/mpi.jam +++ b/src/tools/mpi.jam @@ -291,6 +291,12 @@ rule init ( mpicxx ? : options * : mpirun-with-options * ) command = [ common.get-invocation-command mpi : mpicxx ] ; } + if ! $(mpicxx) && ! $(command) + { + # Try "CC", which is used by Cray + command = [ common.get-invocation-command mpi : CC ] ; + } + local result ; local compile_flags ; local link_flags ; @@ -396,6 +402,17 @@ rule init ( mpicxx ? : options * : mpirun-with-options * ) compile_flags = "$(compile_flags) $(f_flags)" ; } } + # Cray + else if [ safe-shell-command "$(command) -v" ] + { + compile_flags = [ safe-shell-command "$(command) -###" ] ; + link_flags = [ safe-shell-command "$(command) -###" ] ; + # ECHO "Noel: compile_flags: $(compile_flags)" ; + # ECHO "Noel: link_flags: $(link_flags)" ; + result = " " ; + } + + # Prepend COMPILER as the executable name, to match the format of if $(result) || $(compile_flags) && $(link_flags) {