Fortran: Restore support for TARGET_OBJECTS providing modules
When a target ends up with TARGET_OBJECTS
of another target, modules
generated by the compilation of those objects is also of interest to
module-consuming targets. When computing link dependencies, add these
entries so that they may be properly considered.
Also add tests which use target objects directly and through an
INTERFACE
library with target objects in its own sources.
Fixes: #25365 (closed)
Marked as 3.28, but should go to 3.27.
Cc: @scivision
Backport: release
Edited by Brad King