mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
Find{BLAS,LAPACK}: Generalize recognition of dependencies as link flags
This commit is contained in:
@@ -231,8 +231,8 @@ function(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addlib
|
|||||||
list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
|
list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
|
||||||
|
|
||||||
foreach(_library ${_list})
|
foreach(_library ${_list})
|
||||||
if(_library MATCHES "^-Wl,--(start|end)-group$")
|
if(_library MATCHES "^-")
|
||||||
# Respect linker flags like --start/end-group (required by MKL)
|
# Respect linker flags as-is (required by MKL)
|
||||||
list(APPEND _libraries "${_library}")
|
list(APPEND _libraries "${_library}")
|
||||||
else()
|
else()
|
||||||
set(_combined_name ${_combined_name}_${_library})
|
set(_combined_name ${_combined_name}_${_library})
|
||||||
|
@@ -213,8 +213,8 @@ function(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addl
|
|||||||
list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
|
list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
|
||||||
|
|
||||||
foreach(_library ${_list})
|
foreach(_library ${_list})
|
||||||
if(_library MATCHES "^-Wl,--(start|end)-group$")
|
if(_library MATCHES "^-")
|
||||||
# Respect linker flags like --start/end-group (required by MKL)
|
# Respect linker flags as-is (required by MKL)
|
||||||
list(APPEND _libraries "${_library}")
|
list(APPEND _libraries "${_library}")
|
||||||
else()
|
else()
|
||||||
set(_combined_name ${_combined_name}_${_library})
|
set(_combined_name ${_combined_name}_${_library})
|
||||||
|
Reference in New Issue
Block a user