forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lapack-reference] Update, fixes (microsoft#28679)
* [cmake-user] Test FindLAPACK.cmake * Minor cleanup * Avoid release-only lib variable * Fix usage of external blas * Update to 3.11 * Add usage doc * Update versions
- Loading branch information
Showing
7 changed files
with
59 additions
and
17 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,21 @@ | ||
diff --git a/CMAKE/lapack-config-install.cmake.in b/CMAKE/lapack-config-install.cmake.in | ||
index 7760960..102eb92 100644 | ||
--- a/CMAKE/lapack-config-install.cmake.in | ||
+++ b/CMAKE/lapack-config-install.cmake.in | ||
@@ -12,8 +12,14 @@ unset(_LAPACK_TARGET) | ||
set(LAPACK_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") | ||
|
||
# Report the blas and lapack raw or imported libraries. | ||
-set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@") | ||
+if("@USE_OPTIMIZED_BLAS@") | ||
+ include(CMakeFindDependencyMacro) | ||
+ find_dependency(BLAS) # For current build type | ||
+ set(LAPACK_blas_LIBRARIES "${BLAS_LIBRARIES}") | ||
+else() | ||
+ set(LAPACK_blas_LIBRARIES "@BLASLIB@") # target carries link libraries | ||
+endif() | ||
set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@") | ||
-set(LAPACK_LIBRARIES ${LAPACK_blas_LIBRARIES} ${LAPACK_lapack_LIBRARIES}) | ||
+set(LAPACK_LIBRARIES ${LAPACK_lapack_LIBRARIES}) # target carries link libraries | ||
|
||
unset(_LAPACK_SELF_DIR) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
lapack-reference provides CMake targets: | ||
|
||
find_package(lapack CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE lapack) | ||
|
||
lapack-reference is compatible with built-in CMake targets: | ||
|
||
find_package(LAPACK REQUIRED) | ||
target_link_libraries(main PRIVATE LAPACK::LAPACK) |
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
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