|
Boost-Build : |
From: Noel Belcourt (kbelco_at_[hidden])
Date: 2006-03-25 16:19:47
Hi,
Another rookie question here.
I have this in my user-config.jam
# Configure Sun
using sun ; # : 5.7 : /opt/SUNWhpc/bin/mpCC : <stdlib>sun-stlport ;
using sunf77 ; # : 5.7 : /opt/SUNWhpc/bin/mpf95 : <fflags>-f77 ;
and I want users to get the CC/cc/f77 compilers by default. But I want
to make it easy for users to build with the MPI compiler wrappers
located in Sun's High Performance Computing directory
(/opt/SUNWhpc/bin) which are invoked as mpCC/mpcc/mpf77.
So the tools/build/v2/tools/sun.jam file has this initialization rule
rule init ( version ? : command * : options * )
{
local condition = [ common.check-init-parameters sun : version
$(version) ] ;
command = [ common.get-invocation-command sun : CC : $(command) :
"/opt/SUNWspro/bin" ] ;
common.handle-options sun : $(condition) : $(command) : $(options) ;
command_c = $(command_c[1--2]) $(command[-1]:B=cc) ;
toolset.flags sun CONFIG_C_COMMAND $(condition) : $(command_c) ;
}
which is almost correct for what I need. The only problem is that when
users compile with the SUNWhpc compilers, C files are invoked as
/opt/SUNWhpc/bin/cc rather than the correct /opt/SUNWhpc/bin/mpcc.
Part of my problem is that I want to take the user supplied command,
/opt/SUNWhpc/bin/mpCC, and just replace the CC with cc to compile c
files but I don't know how to do that.
I just not sure what the best solution is to this problem, any ideas?
-- Noel
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk