Skip to content

Commit

Permalink
In CMake, install BLAS::BLAS and LAPACK::LAPACK
Browse files Browse the repository at this point in the history
  • Loading branch information
weslleyspereira committed May 25, 2023
1 parent 0c44dd4 commit c819999
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
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

0 comments on commit c819999

Please sign in to comment.