diff options
author | Brad King <brad.king@kitware.com> | 2023-04-04 13:30:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-04-04 13:30:39 (GMT) |
commit | 87b97464f7e0e0fa46629fc46f1ddfeec123c773 (patch) | |
tree | af71be1731d4a8876c88951704f5333e97484dfc | |
parent | 9831bb160ac94a92ce3f3a4ebea0948971f62f98 (diff) | |
parent | 9d18426c479b9f337314c5fd1f8a3eaeaba89019 (diff) | |
download | CMake-87b97464f7e0e0fa46629fc46f1ddfeec123c773.zip CMake-87b97464f7e0e0fa46629fc46f1ddfeec123c773.tar.gz CMake-87b97464f7e0e0fa46629fc46f1ddfeec123c773.tar.bz2 |
Merge topic 'FindBLAS-LAPACK-vendor-var'
9d18426c47 Find{BLAS,LAPACK}: Prefer BLA_VENDOR cmake variable over env variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8387
-rw-r--r-- | Modules/FindBLAS.cmake | 8 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 7af1017..19bef94 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -386,10 +386,10 @@ set(BLAS_LINKER_FLAGS) set(BLAS_LIBRARIES) set(BLAS95_LIBRARIES) set(_blas_fphsa_req_var BLAS_LIBRARIES) -if(NOT $ENV{BLA_VENDOR} STREQUAL "") - set(BLA_VENDOR $ENV{BLA_VENDOR}) -else() - if(NOT BLA_VENDOR) +if(NOT BLA_VENDOR) + if(NOT "$ENV{BLA_VENDOR}" STREQUAL "") + set(BLA_VENDOR "$ENV{BLA_VENDOR}") + else() set(BLA_VENDOR "All") endif() endif() diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 1eecb1c..17117bd 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? |