From 98ef6632d9f7de15472246ccde76a749be0d37ca Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 14 Apr 2021 14:18:25 -0400 Subject: Find{BLAS,LAPACK}: Generalize recognition of dependencies as link flags --- Modules/FindBLAS.cmake | 4 ++-- Modules/FindLAPACK.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 0ad5d8c..61e92c9 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -231,8 +231,8 @@ function(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addlib list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") foreach(_library ${_list}) - if(_library MATCHES "^-Wl,--(start|end)-group$") - # Respect linker flags like --start/end-group (required by MKL) + if(_library MATCHES "^-") + # Respect linker flags as-is (required by MKL) list(APPEND _libraries "${_library}") else() set(_combined_name ${_combined_name}_${_library}) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 2c74c6e..11bd411 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -213,8 +213,8 @@ function(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addl list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") foreach(_library ${_list}) - if(_library MATCHES "^-Wl,--(start|end)-group$") - # Respect linker flags like --start/end-group (required by MKL) + if(_library MATCHES "^-") + # Respect linker flags as-is (required by MKL) list(APPEND _libraries "${_library}") else() set(_combined_name ${_combined_name}_${_library}) -- cgit v0.12