summaryrefslogtreecommitdiff
path: root/Modules/FindLAPACK.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-04-03 09:58:58 -0400
committerBrad King <brad.king@kitware.com>2023-04-03 09:58:58 -0400
commit9d18426c479b9f337314c5fd1f8a3eaeaba89019 (patch)
tree70c976d7d4137206e1ef01a319726c5c669d32b4 /Modules/FindLAPACK.cmake
parent2c59598b9117f546e35f2cdb291c3052f75dfd3e (diff)
downloadcmake-9d18426c479b9f337314c5fd1f8a3eaeaba89019.tar.gz
Find{BLAS,LAPACK}: Prefer BLA_VENDOR cmake variable over env variable
This is implied by the documentation, but was not implemented properly. Fixes: #24664
Diffstat (limited to 'Modules/FindLAPACK.cmake')
-rw-r--r--Modules/FindLAPACK.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 1eecb1cbd2..17117bd871 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -304,10 +304,12 @@ endif()
# Search for different LAPACK distributions if BLAS is found
if(NOT LAPACK_NOT_FOUND_MESSAGE)
set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS})
- if(NOT $ENV{BLA_VENDOR} STREQUAL "")
- set(BLA_VENDOR $ENV{BLA_VENDOR})
- elseif(NOT BLA_VENDOR)
- set(BLA_VENDOR "All")
+ if(NOT BLA_VENDOR)
+ if(NOT "$ENV{BLA_VENDOR}" STREQUAL "")
+ set(BLA_VENDOR "$ENV{BLA_VENDOR}")
+ else()
+ set(BLA_VENDOR "All")
+ endif()
endif()
# LAPACK in the Intel MKL 10+ library?