MetOffice / fab

Flexible build system for scientific software
https://metoffice.github.io/fab/
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Handle the fact that not all compilers produce .mod files #48

Open stevewardle opened 4 years ago

MatthewHambley commented 1 year ago

This issue is a little more complicated than it seems.

The only compiler I've come across which doesn't create module files (by default) is the Cray compiler. Instead it puts the module information in the object files.

This is all right if you are compiling an executable as all the object files will be available. It becomes more problematic when compiling a library. If you are, in fact, creating a .a object archive then again you are storing the object files so things could still work, in theory.

When building a dynamic library all bets are off. I suspect the process will strip away and module information and even if it were preserved, how would it be accessed?

We don't need to worry about using library compiled with one compiler being used with another. This will never work as module file format is not standardised.