Backport a Fortran-with-CMake patch from CMake 3.20
This is already merged upstream and slated for 3.20, but is convenient
to have in ports now (with CMake 3.19.4). It allows propagating
CMAKE_EXE_LINKER_FLAGS into fortran-compatibility-tests in the face
of post-CMake-3.10 policy settings.
Patch from yuri@, only massaged to avoid having an octothorpe in
a filename.
PR: 253381
Submitted by: yuri@
Obtained from: upstream