-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[clapack] Revise #50727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[clapack] Revise #50727
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,86 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 320ccc6..31a4083 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -1,4 +1,4 @@ | ||
| -cmake_minimum_required(VERSION 2.6) | ||
| +cmake_minimum_required(VERSION 3.10) | ||
| project(CLAPACK C) | ||
| enable_testing() | ||
| include(CTest) | ||
| @@ -19,16 +19,21 @@ if(NOT USE_BLAS_WRAP) | ||
| endif() | ||
| include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE) | ||
| add_subdirectory(F2CLIBS) | ||
| -add_subdirectory(BLAS) | ||
| +find_package(BLAS REQUIRED) | ||
| add_subdirectory(SRC) | ||
| -add_subdirectory(TESTING) | ||
| set(CLAPACK_VERSION 3.2.1) | ||
| set(CPACK_PACKAGE_VERSION_MAJOR 3) | ||
| set(CPACK_PACKAGE_VERSION_MINOR 2) | ||
| set(CPACK_PACKAGE_VERSION_PATCH 1) | ||
| include(CPack) | ||
| -export(TARGETS f2c blas lapack FILE clapack-targets.cmake) | ||
| +install(EXPORT clapack-targets | ||
| + FILE clapack-targets.cmake | ||
| + DESTINATION share/clapack | ||
| + ) | ||
| configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in | ||
| ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY) | ||
| configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in | ||
| ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY) | ||
| +install(FILES ${CLAPACK_BINARY_DIR}/clapack-config.cmake ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake | ||
| + DESTINATION share/clapack | ||
| + ) | ||
| diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt | ||
| index 43d7b3f..0e988d1 100644 | ||
| --- a/F2CLIBS/libf2c/CMakeLists.txt | ||
| +++ b/F2CLIBS/libf2c/CMakeLists.txt | ||
| @@ -60,3 +60,16 @@ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c) | ||
| include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c) | ||
| add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h) | ||
| set_property(TARGET f2c PROPERTY PREFIX lib) | ||
| +if(UNIX) | ||
| + target_link_libraries(f2c PRIVATE m) | ||
| +endif() | ||
| +install(TARGETS f2c | ||
| + EXPORT clapack-targets | ||
| + RUNTIME DESTINATION bin | ||
| + LIBRARY DESTINATION lib | ||
| + ARCHIVE DESTINATION lib | ||
| + INCLUDES DESTINATION include | ||
| + ) | ||
| +install(FILES ${PROJECT_SOURCE_DIR}/INCLUDE/f2c.h | ||
| + DESTINATION include | ||
| +) | ||
| diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt | ||
| index ac4cce3..746ebe5 100644 | ||
| --- a/SRC/CMakeLists.txt | ||
| +++ b/SRC/CMakeLists.txt | ||
| @@ -376,5 +376,14 @@ if(BUILD_COMPLEX16) | ||
| set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX}) | ||
| endif() | ||
| add_library(lapack ${ALLOBJ} ${ALLXOBJ}) | ||
| -target_link_libraries(lapack blas) | ||
| - | ||
| +target_link_libraries(lapack PRIVATE ${BLAS_LIBRARIES} f2c) | ||
| +install(TARGETS lapack | ||
| + EXPORT clapack-targets | ||
| + RUNTIME DESTINATION bin | ||
| + LIBRARY DESTINATION lib | ||
| + ARCHIVE DESTINATION lib | ||
| + INCLUDES DESTINATION include | ||
| + ) | ||
| +install(FILES ${PROJECT_SOURCE_DIR}/INCLUDE/clapack.h | ||
| + DESTINATION include | ||
| +) | ||
| diff --git a/clapack-config.cmake.in b/clapack-config.cmake.in | ||
| index cd19f1d..7fa272f 100644 | ||
| --- a/clapack-config.cmake.in | ||
| +++ b/clapack-config.cmake.in | ||
| @@ -1 +1,3 @@ | ||
| -include("@CLAPACK_BINARY_DIR@/clapack-targets.cmake") | ||
| +include(CMakeFindDependencyMacro) | ||
| +find_dependency(BLAS) | ||
| +include("${CMAKE_CURRENT_LIST_DIR}/clapack-targets.cmake") |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| message(STATUS "Using VCPKG FindLAPACK from package 'clapack'") | ||
| set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) | ||
| list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) | ||
| message(STATUS "Using vcpkg FindLAPACK.cmake from port 'clapack'.") | ||
| set(LAPACK_PREV_MODULE_PATH "${CMAKE_MODULE_PATH}") | ||
| list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
|
|
||
| list(REMOVE_ITEM ARGS "NO_MODULE") | ||
| list(REMOVE_ITEM ARGS "CONFIG") | ||
| list(REMOVE_ITEM ARGS "MODULE") | ||
|
|
||
| _find_package(${ARGS}) | ||
| _find_package(${ARGS} MODULE) | ||
|
|
||
| set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review note: This used to be below so the "Doesn't make much sense but ok." comment that doesn't make much sense is the status quo.
No change requested.