mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-29 18:49:03 -06:00
Find{BLAS,LAPACK}: Simplify appending to list of libraries
This commit is contained in:
@@ -239,7 +239,7 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
|
||||
foreach(_library ${_list})
|
||||
if(_library MATCHES "^-Wl,--(start|end)-group$")
|
||||
# Respect linker flags like --start/end-group (required by MKL)
|
||||
set(${LIBRARIES} ${${LIBRARIES}} "${_library}")
|
||||
list(APPEND ${LIBRARIES} "${_library}")
|
||||
else()
|
||||
set(_combined_name ${_combined_name}_${_library})
|
||||
if(NOT "${_threadlibs}" STREQUAL "")
|
||||
@@ -253,7 +253,7 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
|
||||
PATH_SUFFIXES ${_subdirs}
|
||||
)
|
||||
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
|
||||
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
|
||||
list(APPEND ${LIBRARIES} ${${_prefix}_${_library}_LIBRARY})
|
||||
set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
@@ -279,7 +279,7 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
|
||||
if("${_list}" STREQUAL "")
|
||||
set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES")
|
||||
else()
|
||||
set(${LIBRARIES} ${${LIBRARIES}} ${_threadlibs})
|
||||
list(APPEND ${LIBRARIES} ${_threadlibs})
|
||||
endif()
|
||||
else()
|
||||
set(${LIBRARIES} FALSE)
|
||||
|
||||
@@ -221,7 +221,7 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
|
||||
foreach(_library ${_list})
|
||||
if(_library MATCHES "^-Wl,--(start|end)-group$")
|
||||
# Respect linker flags like --start/end-group (required by MKL)
|
||||
set(${LIBRARIES} ${${LIBRARIES}} "${_library}")
|
||||
list(APPEND ${LIBRARIES} "${_library}")
|
||||
else()
|
||||
set(_combined_name ${_combined_name}_${_library})
|
||||
if(NOT "${_threadlibs}" STREQUAL "")
|
||||
@@ -235,7 +235,7 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
|
||||
PATH_SUFFIXES ${_subdirs}
|
||||
)
|
||||
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
|
||||
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
|
||||
list(APPEND ${LIBRARIES} ${${_prefix}_${_library}_LIBRARY})
|
||||
set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
@@ -262,7 +262,7 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
|
||||
if("${_list}${_blas}" STREQUAL "")
|
||||
set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES")
|
||||
else()
|
||||
set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threadlibs})
|
||||
list(APPEND ${LIBRARIES} ${_blas} ${_threadlibs})
|
||||
endif()
|
||||
else()
|
||||
set(${LIBRARIES} FALSE)
|
||||
|
||||
Reference in New Issue
Block a user