-
Notifications
You must be signed in to change notification settings - Fork 441
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
Compatibility with CMake's imported targets LAPACK::LAPACK #483
Comments
I also think that it could be implemented via modifying the (lapack-config-install.cmake.in)[https://github.com/Reference-LAPACK/lapack/blob/master/CMAKE/lapack-config-install.cmake.in] by adding this snippet: add_library(LAPACK::LAPACK UNKNOWN IMPORTED)
target_link_libraries(LAPACK::LAPACK PUBLIC lapack) but I'm not exactly sure about it. I'll try to check it and make PR if you will be interested in it |
Sounds interesting, some notes though:
|
Usually but in 2016 for example there was still no 2-by-1 CS decomposition in Intel MKL.
CMake can automatically generate the target export. There is hardly any need to maintain it but #488 should be resolved before. From the top of my head: include(GNUInstallDirs) # avoid having to bother with `lib`, `lib64` directories
option(BUILD_SHARED_LIBS "Build shared libraries" CACHE ON)
add_library(blas sgemm.f)
add_library(lapack sggqrcs.f)
target_link_libraries(lapack blas)
install(
TARGET blas
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
EXPORT blas-export
)
install(
TARGET lapack
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
EXPORT lapack-export
)
install(
EXPORT blas-export lapack-export
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${PROJECTION_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} |
The upstream CMake has some machinery to find the LAPACK library and it defines the
LAPACK::LAPACK
imported target.It would be very convenient if the lapack itself make this imported target
See upstream documentation for package API details and
see this new fancy guide about importing and exporting targets
Thanks for your attention!
The text was updated successfully, but these errors were encountered: