-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[blas/lapack] force vendor #24327
[blas/lapack] force vendor #24327
Changes from 53 commits
ac1f57e
f2df1fa
f14cac7
995f5b2
b92ef3b
ef59437
d887061
c12bad7
c50945d
16373d0
9759dd2
a8df6e7
1e1819c
63b429d
dc751ce
6feaf6b
677cb68
5fe252b
272a28c
0fe4af8
ef73585
d58573d
244878c
55d4d09
b7c002b
d77a77e
9896014
4c2e724
f0b472c
bbf8ace
1044e8d
b4e1bfc
4b0a163
e2193ee
b40a3a9
1052fc6
eba70b8
499886c
09ddd5e
3cd56c9
4339948
76c27e2
f562fcb
8ab457d
a1ed890
aa79c87
41111e1
f3688f5
7d7b076
6d4ec44
d7485f8
1b3df81
7ae0409
ad9405a
0ceb6ca
fd64330
5e5852d
f455709
e838da1
f1aef26
e947d22
e2e85f2
9b41be6
affdd7e
a9f6f57
164ec71
6e12241
2637ba6
29fdcb5
ddac191
5e89b43
2699c49
912b5d0
b47cadb
cc03e3d
6db8250
343d986
0a131bf
58f503d
481085f
9175648
dd61a83
771e1e4
42eb54e
1f7cefd
31284db
e1273ab
36c0019
e0bab30
e372c9d
a36095e
a5f3174
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
prefix=${pcfiledir}/../.. | ||
|
||
Name: BLAS | ||
Description: Implementation of BLAS | ||
Version: | ||
Requires: @requires@ | ||
Libs: @libs@ | ||
Cflags: @cflags@ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,46 @@ | ||
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
|
||
# Make sure BLAS can be found | ||
vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_PORT_DIR} | ||
OPTIONS -DCMAKE_PREFIX_PATH="${CURRENT_PACKAGES_DIR}") | ||
file(READ "${CURRENT_PORT_DIR}/vcpkg.json" manifest_contents) | ||
string(JSON ver_str GET "${manifest_contents}" version-string) | ||
|
||
if(ver_str STREQUAL "default") | ||
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. Is this leftover from an experiment? 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. The idea is to also supply the version-strings "blas-reference|netlib-blas","openblas" (so every platform uses openblas) and "mkl" to determine the selection in the future (since the options RFC is seemingly going nowhere in the near future. But if it comes it would just replace the existing |
||
# OpenBLAS | ||
if(VCPKG_TARGET_IS_OSX) | ||
set(BLA_VENDOR Apple) | ||
set(requires "") | ||
set(libs "-framework Accelerate") | ||
set(cflags "-framework Accelerate") | ||
elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
set(BLA_VENDOR Generic) | ||
set(requires "blas-reference") | ||
else() | ||
set(BLA_VENDOR OpenBLAS) | ||
set(requires openblas) | ||
endif() | ||
|
||
configure_file("${CMAKE_CURRENT_LIST_DIR}/blas.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc" @ONLY) | ||
if(NOT VCPKG_BUILD_TYPE) | ||
configure_file("${CMAKE_CURRENT_LIST_DIR}/blas.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc" @ONLY) | ||
endif() | ||
# For possible overlays: | ||
|
||
# Intel MKL | ||
#if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) | ||
# set(BLA_VENDOR Intel10_64lp) | ||
#elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) | ||
# set(BLA_VENDOR Intel10_32) | ||
#else() | ||
# message(FATAL_ERROR "Unsupported target architecture for Intel MKL!") | ||
#endif() | ||
|
||
# Apple Accelerate Framework | ||
# set(BLA_VENDOR Apple) | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
set(BLA_STATIC ON) | ||
else() | ||
set(BLA_STATIC OFF) | ||
endif() | ||
|
||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/blas/vcpkg-cmake-wrapper.cmake" @ONLY) | ||
endif() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(BLA_VENDOR @BLA_VENDOR@) | ||
set(BLA_STATIC @BLA_STATIC@) | ||
_find_package(${ARGS}) | ||
unset(BLA_VENDOR) | ||
unset(BLA_STATIC) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
{ | ||
"$comment": "Keep the platform expressions in sync with the wrappers installed by the portfiles!", | ||
"name": "blas", | ||
"version-string": "1", | ||
"port-version": 1, | ||
"version-string": "default", | ||
"description": "Metapackage for packages which provide BLAS", | ||
"license": null, | ||
"dependencies": [ | ||
"openblas" | ||
{ | ||
"$comment": "Will use internal generic BLAS of lapack-reference", | ||
"name": "lapack-reference", | ||
"platform": "static & windows" | ||
}, | ||
{ | ||
"name": "openblas", | ||
"platform": "!(osx | (static & windows))" | ||
}, | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
} | ||
] | ||
} |
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.
Can you remove
PACKAGE_NAME Armadillo
? It creates inconsistencies depending on filesystem case-sensitivity, and the default is good enough here.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.
In general I try to keep upstream case convention.
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.
If we care for upstream, we should leave the config in share/Armadillo/CMake...
Do you see share/Armadillo when vcpkg creates share/${PORT} first?
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.
will
vcpkg_cmake_config_fixup
fixup the case in the include below? If not -> Never mess with upstream case you are just asking for includes not being found ;)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.
Even the do-not-mess-with-directory-name policy could be handled for omitting
PACKAGE_NAME
...From a strict point of view, vcpkg shouldn't move config out of any location which is fully supported by CMake.
But given that the include is already treated with
vcpkg_replace_string
, it would be easy to handle this particular case.