Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty Fortran source file to force Fortran linkage in CMake #30

Open
goxberry opened this issue Sep 25, 2019 · 0 comments
Open

Add empty Fortran source file to force Fortran linkage in CMake #30

goxberry opened this issue Sep 25, 2019 · 0 comments

Comments

@goxberry
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant