Add empty Fortran source file to force Fortran linkage in CMake
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 236
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
In the event that we use a CMake-based build system, CMake cannot detect whether BLAS or LAPACK require linking in libraries from a Fortran compiler. This issue does not arise with OpenBLAS or MKL, but does occur with reference BLAS in https://github.com/Reference-LAPACK/lapack.
A fix is discussed in https://cmake.org/pipermail/cmake/2010-July/038172.html by one of the CMake developers: add an empty Fortran source file to the library. This workaround ensures that Fortran libraries are added as dependencies when linking libROM to any executable.
I have a branch that implements this fix as part of work for Youngsoo, and hopefully I'll get around to submitting a PR later this week.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the repository's CMake build configuration and the library sources involved in BLAS/LAPACK linkage. Add the empty Fortran source file described in the issue, then verify that a CMake-built executable links the required Fortran libraries when using reference BLAS or LAPACK.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, fortran
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100