From d8ade0500e394e5b03f7f160f5b46bf556e82feb Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Sat, 5 Sep 2026 14:24:14 -0500 Subject: [PATCH] Find{BLAS,LAPACK}: Provide full paths in `{BLAS,LAPACK}_LIBRARIES` with NVPL Documentation as of CMake 4.4.3 states that these variables provide full paths to libraries, so some existing consumers expect it. NVPL provides imported targets that set `IMPORTED_LOCATION_RELEASE`. Fixes: #28073 --- Modules/FindBLAS.cmake | 2 +- Modules/FindLAPACK.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index ca1a792951..7fbef34946 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -1386,7 +1386,7 @@ if(BLA_VENDOR STREQUAL "NVPL" OR BLA_VENDOR STREQUAL "All") set(_blas_lib "nvpl::blas${_nvpl_int}${_nvpl_thread}") if(TARGET ${_blas_lib}) - set(BLAS_LIBRARIES ${_blas_lib}) + get_target_property(BLAS_LIBRARIES ${_blas_lib} IMPORTED_LOCATION_RELEASE) break() endif() diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 45183178f7..e12dea91dc 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -758,7 +758,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) set(_lapack_lib "nvpl::lapack${_nvpl_int}${_nvpl_thread}") if(TARGET ${_lapack_lib}) - set(LAPACK_LIBRARIES ${_lapack_lib}) + get_target_property(LAPACK_LIBRARIES ${_lapack_lib} IMPORTED_LOCATION_RELEASE) break() endif()