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

In CMake, install BLAS::BLAS and LAPACK::LAPACK #840

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions BLAS/SRC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
# Level 1 BLAS
#---------------------------------------------------------

set(LAPACK_INSTALL_EXPORT_NAME ${BLASLIB}-targets)

set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f90
srot.f srotg.f90 sscal.f sswap.f sdsdot.f srotmg.f srotm.f)

Expand Down Expand Up @@ -117,6 +119,14 @@ set_target_properties(
)
lapack_install_library(${BLASLIB})

add_library(BLAS::BLAS ALIAS ${BLASLIB})
install(EXPORT ${BLASLIB}-targets
FILE ${BLASLIB}-targets.cmake
NAMESPACE BLAS::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKLIB}-${LAPACK_VERSION}
COMPONENT Development
)

if( TEST_FORTRAN_COMPILER )
add_dependencies( ${BLASLIB} run_test_zcomplexabs run_test_zcomplexdiv run_test_zcomplexmult run_test_zminMax )
endif()
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,10 @@ endif()
# install tree, if any.
set(_lapack_config_install_guard_target "")
if(ALL_TARGETS)
add_library(LAPACK::LAPACK ALIAS ${LAPACKLIB})
install(EXPORT ${LAPACKLIB}-targets
FILE ${LAPACKLIB}-targets.cmake
NAMESPACE LAPACK::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKLIB}-${LAPACK_VERSION}
COMPONENT Development
)
Expand Down