Skip to content

Commit

Permalink
Support setting linker flags for BLAS and LAPACK libraries manually
Browse files Browse the repository at this point in the history
Fixes #626.
  • Loading branch information
mmuetzel committed Dec 29, 2023
1 parent 9c6ac8f commit 43fe8a1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ option ( SUITESPARSE_USE_64BIT_BLAS
option ( BLA_STATIC
"OFF (default): dynamic linking of BLAS. ON: static linking of BLAS" OFF )

if ( DEFINED BLAS_LIBRARIES OR DEFINED BLAS_INCLUDE_DIRS )
# User supplied variables for libraries and/or include directories.
# Use them as-is.
if ( SUITESPARSE_USE_64BIT_BLAS )
set ( SuiteSparse_BLAS_integer "int64_t" )
else ( )
set ( SuiteSparse_BLAS_integer "int32_t" )
endif ( )
return ( )
endif ( )

#-------------------------------------------------------------------------------
# look for a specific BLAS library
#-------------------------------------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions SuiteSparse_config/cmake_modules/SuiteSparseLAPACK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@

cmake_minimum_required ( VERSION 3.22 )

if ( DEFINED LAPACK_LIBRARIES OR DEFINED LAPACK_INCLUDE_DIRS )
# User supplied variables for libraries and/or include directories.
# Use them as-is.
return ( )
endif ( )

if ( BLA_VENDOR STREQUAL "FLAME" )

find_library ( LAPACK_LIBRARY
Expand Down

0 comments on commit 43fe8a1

Please sign in to comment.