← Back to team overview

yade-dev team mailing list archive

Re: scons and automatic linking

 

> 1. my proposal: grep source files for #include and link with those
> files that are found after #include. Add a short table which contains
> exceptions of this rule.
> 
> 2. Bruno's proposal: link with everything compiled so far.

I thought about that once, but is much more complicated than it seems. First 
and foremost, linking (among other) determines compilation order, for which 
reason (2) will never work. For (1), I think grepping #includes is not 
sufficient, since there may be nested includes and so on (?). Some files may 
contain more than one class (like Clump contains ClumpTestGen, Clump, 
ClumpMemberMover).

Proper solution that I tried just on the command-line is list symbols in the 
object file and determine what classes from yade it needs to be linked with; 
then determine what file contains that class; then link. I am not sure how 
to integrate that into scons and it is UNIX-specific (uses nm).

Conclusion: it is not straightforward and it will not happen in near future 
in a robust way. I may play with that because I personally don't like that 
either.

Vaclav.
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



Follow ups

References