mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-03 14:20:27 +00:00
Find{BLAS,LAPACK}: Avoid clobbering results when no vendor is requested
Logic added by commit4c74c86f40(FindBLAS/LAPACK: Add support for the Fujitsu SSL2 library, 2021-01-27, v3.21.0-rc1~402^2~1) accidentally expressed a boolean condition without proper grouping. The pattern was then copied by commit2c9e623e31(Find{BLAS,LAPACK}: Add support for the NVHPC LAPACK library, 2021-05-05, v3.21.0-rc1~192^2). The resulting logic incorrectly tries Fujitsu and NVHPC vendors even after results are found from another vendor, and then erases those. Fix the grouping. Fixes: #22403
This commit is contained in:
@@ -1110,8 +1110,8 @@ if(BLA_VENDOR MATCHES "EML" OR BLA_VENDOR STREQUAL "All")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Fujitsu SSL2 Library?
|
# Fujitsu SSL2 Library?
|
||||||
if(NOT BLAS_LIBRARIES AND
|
if(NOT BLAS_LIBRARIES
|
||||||
BLA_VENDOR MATCHES "Fujitsu_SSL2" OR BLA_VENDOR STREQUAL "All")
|
AND (BLA_VENDOR MATCHES "Fujitsu_SSL2" OR BLA_VENDOR STREQUAL "All"))
|
||||||
if(BLA_VENDOR STREQUAL "Fujitsu_SSL2BLAMP")
|
if(BLA_VENDOR STREQUAL "Fujitsu_SSL2BLAMP")
|
||||||
set(_ssl2_suffix BLAMP)
|
set(_ssl2_suffix BLAMP)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -550,7 +550,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE)
|
|||||||
|
|
||||||
# Fujitsu SSL2 Library?
|
# Fujitsu SSL2 Library?
|
||||||
if(NOT LAPACK_LIBRARIES
|
if(NOT LAPACK_LIBRARIES
|
||||||
AND BLA_VENDOR MATCHES "Fujitsu_SSL2" OR BLA_VENDOR STREQUAL "All")
|
AND (BLA_VENDOR MATCHES "Fujitsu_SSL2" OR BLA_VENDOR STREQUAL "All"))
|
||||||
if(BLA_VENDOR STREQUAL "Fujitsu_SSL2BLAMP")
|
if(BLA_VENDOR STREQUAL "Fujitsu_SSL2BLAMP")
|
||||||
set(_ssl2_suffix BLAMP)
|
set(_ssl2_suffix BLAMP)
|
||||||
else()
|
else()
|
||||||
@@ -582,7 +582,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE)
|
|||||||
|
|
||||||
# NVHPC Library?
|
# NVHPC Library?
|
||||||
if(NOT LAPACK_LIBRARIES
|
if(NOT LAPACK_LIBRARIES
|
||||||
AND BLA_VENDOR MATCHES "NVHPC" OR BLA_VENDOR STREQUAL "All")
|
AND (BLA_VENDOR MATCHES "NVHPC" OR BLA_VENDOR STREQUAL "All"))
|
||||||
check_lapack_libraries(
|
check_lapack_libraries(
|
||||||
LAPACK_LIBRARIES
|
LAPACK_LIBRARIES
|
||||||
LAPACK
|
LAPACK
|
||||||
|
|||||||
Reference in New Issue
Block a user