-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[open3d] fix finding of blas/lapack libraries
- Loading branch information
Showing
4 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/3rdparty/find_dependencies.cmake b/3rdparty/find_dependencies.cmake | ||
index d694621ad..a2b45e8ff 100644 | ||
--- a/3rdparty/find_dependencies.cmake | ||
+++ b/3rdparty/find_dependencies.cmake | ||
@@ -1597,11 +1597,29 @@ else(OPEN3D_USE_ONEAPI_PACKAGES) | ||
find_package(LAPACKE) | ||
if(BLAS_FOUND AND LAPACK_FOUND AND LAPACKE_FOUND) | ||
message(STATUS "System BLAS/LAPACK/LAPACKE found.") | ||
- list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM | ||
- ${BLAS_LIBRARIES} | ||
- ${LAPACK_LIBRARIES} | ||
- ${LAPACKE_LIBRARIES} | ||
- ) | ||
+ if("${BLAS_LIBRARIES}" MATCHES ".*openblas.*") | ||
+ find_package(OpenBLAS) | ||
+ if(OpenBLAS_FOUND) | ||
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM OpenBLAS::OpenBLAS) | ||
+ endif() | ||
+ endif() | ||
+ if(NOT TARGET OpenBlas::OpenBLAS) | ||
+ if(TARGET BLAS::BLAS) | ||
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM BLAS::BLAS) | ||
+ else() | ||
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM ${BLAS_LIBRARIES}) | ||
+ endif() | ||
+ endif() | ||
+ if(TARGET LAPACK::LAPACK) | ||
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM LAPACK::LAPACK) | ||
+ else() | ||
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM ${LAPACK_LIBRARIES}) | ||
+ endif() | ||
+ if(TARGET LAPACK::LAPACKE) | ||
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM LAPACK::LAPACKE) | ||
+ else() | ||
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM ${LAPACKE_LIBRARIES}) | ||
+ endif() | ||
else() | ||
message(STATUS "System BLAS/LAPACK/LAPACKE not found, setting USE_SYSTEM_BLAS=OFF.") | ||
set(USE_SYSTEM_BLAS OFF) | ||
-- | ||
2.45.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters