diff --git a/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake b/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake index 065682663..ca241472d 100644 --- a/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake +++ b/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake @@ -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 #------------------------------------------------------------------------------- diff --git a/SuiteSparse_config/cmake_modules/SuiteSparseLAPACK.cmake b/SuiteSparse_config/cmake_modules/SuiteSparseLAPACK.cmake index 2ffe53624..82366e0aa 100644 --- a/SuiteSparse_config/cmake_modules/SuiteSparseLAPACK.cmake +++ b/SuiteSparse_config/cmake_modules/SuiteSparseLAPACK.cmake @@ -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