Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-08-26 04:07:13


Toon Knapen wrote:
> I have made an extension to bjam to be able to compile fortran sources
> too. So I have defined a file f.jam in the root directory of my project
> that looks like:

[snip]

> But now I have hardcoded the name of the compiler (f77), the flag to be
> used to indicate we only want th object file (-c) and the the flag for
> the include path (-I). As you may well realise by now: this is not a
> very multi-platform approach.
>
> So what is the proper way to extend bjam such that bjam is able to
> compile other languages (than C & C++) ?

I presume the question is actually how to have different fortran compilers? I
think the solution is to have a new feature, say 'fortran-compiler'. You
would pass the name of the compiler to the 'init' rule of f.jam, something
like:

using f : g77 : ... ;
using f : gfortran : ...

and then will be able to specify the desired compiler in the build request.
It's possible to have separate compiler version as well.

You could take a look at borland.jam, as a simple example of toolset file
which supports different installations.

HTH,
Volodya

 


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