|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-01-20 07:55:49
Hi Toon,
> I'm adding fortran toolsets to bjam. However the linking is always done
> by the compiler-driver or the linker directly (which is described in the
> toolset for the C++ compiler). However when creating an executable using
> object files compiled from fortran additional libraries need to be
> passed to the linker because of the dependency of the fortran sources on
> the fortran runtime-libraries. Any ideas how I can do that ?
I presume you want to add some library to link line whenever .F -> .OBJ
generator is invoked.
I think it's almost possible. You'd need to write a custom .F -> .OBJ
generator that will return two targets:
1. The created .OBJ itself.
2. The additional library to be linked with.
So, higher level generator which asked for .F -> .OBJ conversion will get two
targets and try to use both of them.
The only question is how to get that additional target. I think you want to
link with searched libraries? Then you can just copy the code from
searched-lib-generator.run which creates the new 'searched-lib-target'.
- 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