-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[vcpkg baseline] Re-fix lapack-reference to find blas on windows-static #19608
Changes from all commits
11d5f6d
5594726
1e19f46
6db9e11
735f4c5
385a2b2
396507c
ba0ba96
0e8c61a
80a1121
cde1487
f2950fd
d365472
efa3c38
4774545
38697c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The reference BLAS is a freely-available software package. It is available from netlib via anonymous ftp and the World Wide Web. Thus, it can be included in commercial software packages (and has been). We only ask that proper credit be given to the authors. | ||
|
||
Like all software, it is copyrighted. It is not trademarked, but we do ask the following: | ||
If you modify the source for these routines we ask that you change the name of the routine and comment the changes made to the original. | ||
We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index e8d1c1b..d1f320e 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -62,7 +62,7 @@ macro(blas_install_library lib) | ||
EXPORT ${BLAS_INSTALL_EXPORT_NAME} | ||
ARCHIVE DESTINATION lib COMPONENT Development | ||
LIBRARY DESTINATION lib COMPONENT RuntimeLibraries | ||
- RUNTIME DESTINATION lib COMPONENT RuntimeLibraries | ||
+ RUNTIME DESTINATION bin COMPONENT RuntimeLibraries | ||
) | ||
endmacro() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) | ||
|
||
vcpkg_download_distfile(ARCHIVE | ||
URLS "http://www.netlib.org/blas/blas-3.10.0.tgz" | ||
FILENAME "blas-3.10.0.tgz" | ||
SHA512 1f243ce4f7e0974e62c03c49da2741509662e20e82d0ebb73e10a940cff6458739b9dc238125d5e1ae7c179eaba06155bb502327bd58eaf246c29a16e554eeb0 | ||
) | ||
|
||
vcpkg_extract_source_archive_ex( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
ARCHIVE ${ARCHIVE} | ||
PATCHES fix-install.patch | ||
) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
single BUILD_SINGLE | ||
double BUILD_DOUBLE | ||
complex BUILD_COMPLEX | ||
complex16 BUILD_COMPLEX16 | ||
) | ||
|
||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") | ||
set(BUILD_X64 ON) | ||
else() | ||
set(BUILD_X64 OFF) | ||
endif() | ||
|
||
include(vcpkg_find_fortran) | ||
vcpkg_find_fortran(FORTRAN_CMAKE) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
${FORTRAN_CMAKE} | ||
-DBUILD_INDEX64=${BUILD_X64} | ||
-DBUILD_TESTING=OFF | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindBLAS.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/blas") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/blas") | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Use this package via the module FindBLAS that comes with CMake. To use in your CMakeLists.txt: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not true because we are checking-in our own modified version |
||
|
||
find_package(BLAS REQUIRED) | ||
target_compile_options(main PRIVATE ${BLAS_LINKER_FLAGS}) | ||
target_link_libraries(main PRIVATE ${BLAS_LIBRARIES}) |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,12 @@ | ||||||||||||||||||||||||||||
message(STATUS "Using VCPKG FindLAPACK from package 'blas-reference'") | ||||||||||||||||||||||||||||
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") | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
set(BLA_VENDOR "Generic") | ||||||||||||||||||||||||||||
_find_package(${ARGS}) | ||||||||||||||||||||||||||||
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In # Generic BLAS library?
if(BLA_VENDOR STREQUAL "Generic" OR
BLA_VENDOR STREQUAL "NVHPC" OR
BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
check_blas_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"blas"
""
""
""
)
endif()
endif() line 275: function(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addlibdir _subdirs)
...
find_library(${_prefix}_${_lib_var}_LIBRARY
NAMES ${_library}
NAMES_PER_DIR
PATHS ${_extaddlibdir}
PATH_SUFFIXES ${_subdirs}
) Unless we forced the 64bit openblas-reference library name to |
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "blas-reference", | ||
"version-semver": "3.10.0", | ||
"description": "Metapackage for packages which provide BLAS", | ||
"homepage": "http://www.netlib.org/blas/", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-gfortran", | ||
"platform": "windows" | ||
} | ||
], | ||
"default-features": [ | ||
"complex", | ||
"complex16", | ||
"double", | ||
"single" | ||
], | ||
"features": { | ||
"complex": { | ||
"description": "Build single precision complex" | ||
}, | ||
"complex16": { | ||
"description": "Build double precision complex" | ||
}, | ||
"double": { | ||
"description": "Build double precision real" | ||
}, | ||
"single": { | ||
"description": "Build single precision real" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index caa0e71..9319694 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -196,7 +196,7 @@ if(BLAS_LIBRARIES) | ||
endif() | ||
|
||
# User did not provide a BLAS Library but specified to search for one | ||
-elseif(USE_OPTIMIZED_BLAS) | ||
+elseif (USE_OPTIMIZED_BLAS OR USE_EXTERNAL_BLAS) | ||
find_package(BLAS) | ||
endif() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "9eb91f67594d14b2950aa1c2aaeab3f2760f8fa2", | ||
"version-semver": "3.10.0", | ||
"port-version": 0 | ||
} | ||
] | ||
} |
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.
We can't use vcpkg-cmake since issue #19818